From: David S. Miller Date: Fri, 12 Aug 2011 00:58:59 +0000 (-0700) Subject: sparc: Don't do hypervisor calls on non-sun4v in DS driver. X-Git-Tag: v3.1~327^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c92761fd9efcbbcb59e7bf4db88e29ce03229889;p=platform%2Fkernel%2Flinux-amlogic.git sparc: Don't do hypervisor calls on non-sun4v in DS driver. Reported-by: Pieter-Paul Giesberts Signed-off-by: David S. Miller --- diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 490e541..7429b47 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c @@ -1256,13 +1256,14 @@ static int __init ds_init(void) { unsigned long hv_ret, major, minor; - hv_ret = sun4v_get_version(HV_GRP_REBOOT_DATA, &major, &minor); - if (hv_ret == HV_EOK) { - pr_info("SUN4V: Reboot data supported (maj=%lu,min=%lu).\n", - major, minor); - reboot_data_supported = 1; + if (tlb_type == hypervisor) { + hv_ret = sun4v_get_version(HV_GRP_REBOOT_DATA, &major, &minor); + if (hv_ret == HV_EOK) { + pr_info("SUN4V: Reboot data supported (maj=%lu,min=%lu).\n", + major, minor); + reboot_data_supported = 1; + } } - kthread_run(ds_thread, NULL, "kldomd"); return vio_register_driver(&ds_driver);