Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/watchdog: support for KVM hypervisors and delete pr_info messages

This patch extends the diag288 watchdog driver to be able to deal with KVM
hypervisors. Only z/VM needs special handling, we can use the same interface
as on LPAR. Remove all pr_info output to avoid misconception. Because there
is no value in these messages and only the pr_err messages make sense.

Signed-off-by: Xu Wang <gesaint@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Xu Wang and committed by
Martin Schwidefsky
b2527d20 9ec6cb80

+4 -14
+4 -14
drivers/watchdog/diag288_wdt.c
··· 125 125 ret = __diag288_vm(func, dev->timeout, ebc_cmd, len); 126 126 WARN_ON(ret != 0); 127 127 kfree(ebc_cmd); 128 - } 129 - 130 - if (MACHINE_IS_LPAR) { 128 + } else { 131 129 ret = __diag288_lpar(WDT_FUNC_INIT, 132 130 dev->timeout, LPARWDT_RESTART); 133 131 } ··· 134 136 pr_err("The watchdog cannot be activated\n"); 135 137 return ret; 136 138 } 137 - pr_info("The watchdog was activated\n"); 138 139 return 0; 139 140 } 140 141 ··· 142 145 int ret; 143 146 144 147 ret = __diag288(WDT_FUNC_CANCEL, 0, 0, 0); 145 - pr_info("The watchdog was deactivated\n"); 146 148 return ret; 147 149 } 148 150 ··· 173 177 ret = __diag288_vm(func, dev->timeout, ebc_cmd, len); 174 178 WARN_ON(ret != 0); 175 179 kfree(ebc_cmd); 176 - } 177 - 178 - if (MACHINE_IS_LPAR) 180 + } else { 179 181 ret = __diag288_lpar(WDT_FUNC_CHANGE, dev->timeout, 0); 182 + } 180 183 181 184 if (ret) 182 185 pr_err("The watchdog timer cannot be started or reset\n"); ··· 268 273 watchdog_set_nowayout(&wdt_dev, nowayout_info); 269 274 270 275 if (MACHINE_IS_VM) { 271 - pr_info("The watchdog device driver detected a z/VM environment\n"); 272 276 if (__diag288_vm(WDT_FUNC_INIT, 15, 273 277 ebc_begin, sizeof(ebc_begin)) != 0) { 274 278 pr_err("The watchdog cannot be initialized\n"); 275 279 return -EINVAL; 276 280 } 277 - } else if (MACHINE_IS_LPAR) { 278 - pr_info("The watchdog device driver detected an LPAR environment\n"); 281 + } else { 279 282 if (__diag288_lpar(WDT_FUNC_INIT, 30, LPARWDT_RESTART)) { 280 283 pr_err("The watchdog cannot be initialized\n"); 281 284 return -EINVAL; 282 285 } 283 - } else { 284 - pr_err("Linux runs in an environment that does not support the diag288 watchdog\n"); 285 - return -ENODEV; 286 286 } 287 287 288 288 if (__diag288_lpar(WDT_FUNC_CANCEL, 0, 0)) {