summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-08-11 17:58:59 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-15 18:31:43 -0700
commit8af1028380467f993573b5eef904522b9e2f5951 (patch)
tree562a83fbb64c06a4b89566f132fb41d01b18ce99 /arch
parent05362c29b1639185999b695cdaa37e0c1c15444a (diff)
sparc: Don't do hypervisor calls on non-sun4v in DS driver.
commit c92761fd9efcbbcb59e7bf4db88e29ce03229889 upstream. Reported-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/ds.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index 490e5418740d..7429b47c3aca 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);