Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be201f7f authored by Jimi Xenidis's avatar Jimi Xenidis Committed by Linus Torvalds
Browse files

[PATCH] ppc64: Fix recent regression



As noted by Olof Johansson <olof@lixom.net>:

  "A recent patch changed the way the LPAR bit is checked during early
   boot.  This resulted in a polarity change in a conditional branch
   without changing the branch, causing at least some legacy machines to
   not boot."

This fixes it.

Signed-off-by: default avatarJimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0fb74dfb
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1649,7 +1649,7 @@ _GLOBAL(__secondary_start)
	ld	r3,0(r3)
	ld	r3,0(r3)
	lwz	r3,PLATFORM(r3)		/* r3 = platform flags		 */
	lwz	r3,PLATFORM(r3)		/* r3 = platform flags		 */
	andi.	r3,r3,PLATFORM_LPAR	/* Test if bit 0 is set (LPAR bit) */
	andi.	r3,r3,PLATFORM_LPAR	/* Test if bit 0 is set (LPAR bit) */
	bne	98f
	beq	98f			/* branch if result is 0  */
	mfspr	r3,PVR
	mfspr	r3,PVR
	srwi	r3,r3,16
	srwi	r3,r3,16
	cmpwi	r3,0x37			/* SStar  */
	cmpwi	r3,0x37			/* SStar  */
@@ -1813,7 +1813,7 @@ _STATIC(start_here_multiplatform)
	ld	r3,0(r3)
	ld	r3,0(r3)
	lwz	r3,PLATFORM(r3)		/* r3 = platform flags */
	lwz	r3,PLATFORM(r3)		/* r3 = platform flags */
	andi.	r3,r3,PLATFORM_LPAR	/* Test if bit 0 is set (LPAR bit) */
	andi.	r3,r3,PLATFORM_LPAR	/* Test if bit 0 is set (LPAR bit) */
	bne	98f
	beq	98f			/* branch if result is 0  */
	mfspr	r3,PVR
	mfspr	r3,PVR
	srwi	r3,r3,16
	srwi	r3,r3,16
	cmpwi	r3,0x37			/* SStar */
	cmpwi	r3,0x37			/* SStar */
@@ -1834,7 +1834,7 @@ _STATIC(start_here_multiplatform)
	lwz	r3,PLATFORM(r3)		/* r3 = platform flags */
	lwz	r3,PLATFORM(r3)		/* r3 = platform flags */
	/* Test if bit 0 is set (LPAR bit) */
	/* Test if bit 0 is set (LPAR bit) */
	andi.	r3,r3,PLATFORM_LPAR
	andi.	r3,r3,PLATFORM_LPAR
	bne	98f
	bne	98f			/* branch if result is !0  */
	LOADADDR(r6,_SDR1)		/* Only if NOT LPAR */
	LOADADDR(r6,_SDR1)		/* Only if NOT LPAR */
	sub	r6,r6,r26
	sub	r6,r6,r26
	ld	r6,0(r6)		/* get the value of _SDR1 */
	ld	r6,0(r6)		/* get the value of _SDR1 */