public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: linux-ia64@vger.kernel.org
Subject: Re: Problem booting on some HP systems
Date: Fri, 01 Aug 2008 23:43:08 +0000	[thread overview]
Message-ID: <1217634188.3347.69.camel@localhost.localdomain> (raw)
In-Reply-To: <57C9024A16AD2D4C97DC78E552063EA3082ABE01@orsmsx505.amr.corp.intel.com>

On Fri, 2008-08-01 at 16:24 -0700, Luck, Tony wrote:
> Recent kernels are not booting on some HP systems (though
> it does boot on others).  James spent time and tracked it
> to this patch in the pvops series:
> 
> commit 498c5170472ff0c03a29d22dbd33225a0be038f4
> Author: Isaku Yamahata <yamahata@valinux.co.jp>
> Date:   Mon May 19 22:13:38 2008 +0900
> 
>     [IA64] pvops: paravirtualize ivt.S
> 
> I did a quick compile with and without this patch applied and
> compared the diassembled ivt.o file and spotted two places
> where an _FROM_ macro had been used where _TO_ was intended.
> See the <<<<< OOPS below:
> 
> 
> @@ -1360,26 +1357,26 @@ ENTRY(speculation_vector)
>          *
>          * cr.imm contains zero_ext(imm21)
>          */
> -       mov r18=cr.iim
> +       MOV_FROM_IIM(r18)
>         ;;
> -       mov r17=cr.iip
> +       MOV_FROM_IIP(r17)
>         shl r18=r18,43                  // put sign bit in position (43d-21)
>         ;;
> 
> -       mov r16=cr.ipsr
> +       MOV_FROM_IPSR(p0, r16)
>         shr r18=r18,39                  // sign extend (39C-4)
>         ;;
> 
>         add r17=r17,r18                 // now add the offset
>         ;;
> -       mov cr.iip=r17
> +       MOV_FROM_IIP(r17) <<<<<<< OOPS!
>         dep r16=0,r16,41,2              // clear EI
>         ;;
> 
> -       mov cr.ipsr=r16
> +       MOV_FROM_IPSR(p0, r16) <<<<<<<< OOPS!
>         ;;
> 
> -       rfi                             // and go back
> +       RFI
>  END(speculation_vector)
> 
> 
> I don't know whether these are the cause of the problems on James'
> and Willy's machines (could you try swapping these round please?)

Actually tony traced this to errors in the statements by comparing
disassembled output.  There's two register moves that are now the wrong
way around.  Applying this patch gets my system booting again.

James

---

diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index c39627d..b8750a0 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -1243,11 +1243,11 @@ ENTRY(speculation_vector)
 
 	add r17=r17,r18			// now add the offset
 	;;
-	MOV_FROM_IIP(r17)
+	MOV_TO_IIP(r17, p0)
 	dep r16=0,r16,41,2		// clear EI
 	;;
 
-	MOV_FROM_IPSR(p0, r16)
+	MOV_TO_IPSR(p0, r16, p0)
 	;;
 
 	RFI



  reply	other threads:[~2008-08-01 23:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-01 23:24 Problem booting on some HP systems Luck, Tony
2008-08-01 23:43 ` James Bottomley [this message]
2008-08-04  3:08 ` Isaku Yamahata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1217634188.3347.69.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox