.. | .. |
---|
86 | 86 | "1:\n" |
---|
87 | 87 | EX_TABLE(0b, 1b) |
---|
88 | 88 | : "+d" (err) : "d"(__func), "d"(__timeout), |
---|
89 | | - "d"(__action), "d"(__len) : "1", "cc"); |
---|
| 89 | + "d"(__action), "d"(__len) : "1", "cc", "memory"); |
---|
90 | 90 | return err; |
---|
91 | 91 | } |
---|
92 | 92 | |
---|
.. | .. |
---|
272 | 272 | char ebc_begin[] = { |
---|
273 | 273 | 194, 197, 199, 201, 213 |
---|
274 | 274 | }; |
---|
| 275 | + char *ebc_cmd; |
---|
275 | 276 | |
---|
276 | 277 | watchdog_set_nowayout(&wdt_dev, nowayout_info); |
---|
277 | 278 | |
---|
278 | 279 | if (MACHINE_IS_VM) { |
---|
279 | | - if (__diag288_vm(WDT_FUNC_INIT, 15, |
---|
280 | | - ebc_begin, sizeof(ebc_begin)) != 0) { |
---|
| 280 | + ebc_cmd = kmalloc(sizeof(ebc_begin), GFP_KERNEL); |
---|
| 281 | + if (!ebc_cmd) { |
---|
| 282 | + pr_err("The watchdog cannot be initialized\n"); |
---|
| 283 | + return -ENOMEM; |
---|
| 284 | + } |
---|
| 285 | + memcpy(ebc_cmd, ebc_begin, sizeof(ebc_begin)); |
---|
| 286 | + ret = __diag288_vm(WDT_FUNC_INIT, 15, |
---|
| 287 | + ebc_cmd, sizeof(ebc_begin)); |
---|
| 288 | + kfree(ebc_cmd); |
---|
| 289 | + if (ret != 0) { |
---|
281 | 290 | pr_err("The watchdog cannot be initialized\n"); |
---|
282 | 291 | return -EINVAL; |
---|
283 | 292 | } |
---|