Patchwork Bug report: booting 3.1-rc1 on Sunfire V120 fails

login
register
mail settings
Submitter David Miller
Date Aug. 12, 2011, 12:59 a.m.
Message ID <20110811.175914.351039008543512190.davem@davemloft.net>
Download mbox | patch
Permalink /patch/109736/
State Accepted
Delegated to: David Miller
Headers show

Comments

David Miller - Aug. 12, 2011, 12:59 a.m.
From: "Pieter-Paul Giesberts" <pieterpg@broadcom.com>
Date: Thu, 11 Aug 2011 08:52:05 -0700

> [   56.043741] swapper(1): Kernel bad sw trap 7f [#1]

We shouldn't be trying sun4v traps on sun4u hardware :-)

This patch should fix it, thanks for the report:

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pieter-Paul Giesberts - Aug. 12, 2011, 7:32 a.m.
Thanks David, 

With the patch applied it boots and works just fine!

Thanks and regards, Pieter-Paul

> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: vrijdag 12 augustus 2011 2:59
> To: Pieter-Paul Giesberts
> Cc: sparclinux@vger.kernel.org
> Subject: Re: Bug report: booting 3.1-rc1 on Sunfire V120 fails
> 
> From: "Pieter-Paul Giesberts" <pieterpg@broadcom.com>
> Date: Thu, 11 Aug 2011 08:52:05 -0700
> 
> > [   56.043741] swapper(1): Kernel bad sw trap 7f [#1]
> 
> We shouldn't be trying sun4v traps on sun4u hardware :-)
> 
> This patch should fix it, thanks for the report:
> 
> 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);


--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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);