Skip to content
Snippets Groups Projects
Commit d70e2e5a authored by Jan Stancek's avatar Jan Stancek
Browse files

Merge: [s390]: RHEL9.0 - diag288_wdt: do not use stack buffers for hardware data

MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2082

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2171362

Tested: by IBM

Build-Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=50925307



Commits:
fe8973a3 watchdog: diag288_wdt: do not use stack buffers for hardware data
32e40f95 watchdog: diag288_wdt: fix __diag288() inline assembly

Signed-off-by: default avatarTobias Huschle <thuschle@redhat.com>

Approved-by: default avatarSteve Best <sbest@redhat.com>
Approved-by: default avatarTony Camuso <tcamuso@redhat.com>

Signed-off-by: default avatarJan Stancek <jstancek@redhat.com>
parents f9fc4b31 e029d463
No related merge requests found
......@@ -86,7 +86,7 @@ static int __diag288(unsigned int func, unsigned int timeout,
"1:\n"
EX_TABLE(0b, 1b)
: "+d" (err) : "d"(__func), "d"(__timeout),
"d"(__action), "d"(__len) : "1", "cc");
"d"(__action), "d"(__len) : "1", "cc", "memory");
return err;
}
......@@ -268,12 +268,21 @@ static int __init diag288_init(void)
char ebc_begin[] = {
194, 197, 199, 201, 213
};
char *ebc_cmd;
watchdog_set_nowayout(&wdt_dev, nowayout_info);
if (MACHINE_IS_VM) {
if (__diag288_vm(WDT_FUNC_INIT, 15,
ebc_begin, sizeof(ebc_begin)) != 0) {
ebc_cmd = kmalloc(sizeof(ebc_begin), GFP_KERNEL);
if (!ebc_cmd) {
pr_err("The watchdog cannot be initialized\n");
return -ENOMEM;
}
memcpy(ebc_cmd, ebc_begin, sizeof(ebc_begin));
ret = __diag288_vm(WDT_FUNC_INIT, 15,
ebc_cmd, sizeof(ebc_begin));
kfree(ebc_cmd);
if (ret != 0) {
pr_err("The watchdog cannot be initialized\n");
return -EINVAL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment