Skip to content

Commit

Permalink
sparc: Don't do hypervisor calls on non-sun4v in DS driver.
Browse files Browse the repository at this point in the history
commit c92761f 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>
  • Loading branch information
David S. Miller authored and Greg Kroah-Hartman committed Aug 16, 2011
1 parent 05362c2 commit 8af1028
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions arch/sparc/kernel/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8af1028

Please sign in to comment.