aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-08-11 20:58:59 -0400
committerDavid S. Miller <davem@davemloft.net>2011-08-11 20:58:59 -0400
commitc92761fd9efcbbcb59e7bf4db88e29ce03229889 (patch)
tree0f702eb5c37fa4c70c9fbee066ca07c0f2b75b97 /arch/sparc
parent9e23311345135083f6074b280de1e6dc5eee1f68 (diff)
sparc: Don't do hypervisor calls on non-sun4v in DS driver.
Reported-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-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)
1256{ 1256{
1257 unsigned long hv_ret, major, minor; 1257 unsigned long hv_ret, major, minor;
1258 1258
1259 hv_ret = sun4v_get_version(HV_GRP_REBOOT_DATA, &major, &minor); 1259 if (tlb_type == hypervisor) {
1260 if (hv_ret == HV_EOK) { 1260 hv_ret = sun4v_get_version(HV_GRP_REBOOT_DATA, &major, &minor);
1261 pr_info("SUN4V: Reboot data supported (maj=%lu,min=%lu).\n", 1261 if (hv_ret == HV_EOK) {
1262 major, minor); 1262 pr_info("SUN4V: Reboot data supported (maj=%lu,min=%lu).\n",
1263 reboot_data_supported = 1; 1263 major, minor);
1264 reboot_data_supported = 1;
1265 }
1264 } 1266 }
1265
1266 kthread_run(ds_thread, NULL, "kldomd"); 1267 kthread_run(ds_thread, NULL, "kldomd");
1267 1268
1268 return vio_register_driver(&ds_driver); 1269 return vio_register_driver(&ds_driver);