aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-05-14 05:04:10 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-05-16 08:42:44 -0400
commit0cd2f6201c536665d8220672dfcaf7be9da348a1 (patch)
tree79d33cada250696b5205ae0a015540fe54ca6ef9 /drivers/s390
parentd652d59682c8891bdaecfccc72b0209cbe91d89f (diff)
s390/memory hotplug: initialize storage keys
Add missing storage key initialization when memory comes online. Didn't hurt until now, since the kernel always uses access key 0. However for debugging purposes we sometimes use a different key and it might be good if everything is properly initialized... 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.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c
index 231a1d85127b..36506366158d 100644
--- a/drivers/s390/char/sclp_cmd.c
+++ b/drivers/s390/char/sclp_cmd.c
@@ -352,7 +352,17 @@ out:
352 352
353static int sclp_assign_storage(u16 rn) 353static int sclp_assign_storage(u16 rn)
354{ 354{
355 return do_assign_storage(0x000d0001, rn); 355 unsigned long long start, address;
356 int rc;
357
358 rc = do_assign_storage(0x000d0001, rn);
359 if (rc)
360 goto out;
361 start = address = rn2addr(rn);
362 for (; address < start + rzm; address += PAGE_SIZE)
363 page_set_storage_key(address, PAGE_DEFAULT_KEY, 0);
364out:
365 return rc;
356} 366}
357 367
358static int sclp_unassign_storage(u16 rn) 368static int sclp_unassign_storage(u16 rn)