提交 0cd2f620 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 d652d596
......@@ -352,7 +352,17 @@ static int do_assign_storage(sclp_cmdw_t cmd, u16 rn)
static int sclp_assign_storage(u16 rn)
{
return do_assign_storage(0x000d0001, rn);
unsigned long long start, address;
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;
}
static int sclp_unassign_storage(u16 rn)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册