stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/boot: Fix build failure in 32-bit boot wrapper
@ 2016-11-16 18:27 Ben Hutchings
  2016-11-30 12:27 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2016-11-16 18:27 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: stable, Oliver O'Halloran, Michael Ellerman,
	Benjamin Herrenschmidt

[-- Attachment #1: Type: text/plain, Size: 1851 bytes --]

OPAL is not callable from 32-bit mode and the assembly code for it
may not even build (depending on how binutils was configured).

References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=powerpcspe&ver=4.8.7-1&stamp=1479203712
Fixes: 656ad58ef19e ("powerpc/boot: Add OPAL console to epapr wrappers")
Cc: stable <stable@vger.kernel.org> # 4.8
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
I build-tested this (only) with minimal configurations for:

- 32-bit big-endian, CONFIG_PPC_85xx
- 64-bit big-endian, CONFIG_PPC_BOOK3S_64
- 64-bit little-endian, CONFIG_PPC_BOOK3S_64

Ben.

 arch/powerpc/boot/Makefile | 3 ++-
 arch/powerpc/boot/opal.c   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index eae2dc8bc218..9d47f2efa830 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -100,7 +100,8 @@ src-wlib-y := string.S crt0.S crtsavres.S stdio.c decompress.c main.c \
 		ns16550.c serial.c simple_alloc.c div64.S util.S \
 		elf_util.c $(zlib-y) devtree.c stdlib.c \
 		oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \
-		uartlite.c mpc52xx-psc.c opal.c opal-calls.S
+		uartlite.c mpc52xx-psc.c opal.c
+src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) +=  opal-calls.S
 src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c
 src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c
 src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c fsl-soc.c
diff --git a/arch/powerpc/boot/opal.c b/arch/powerpc/boot/opal.c
index 1f37e1c1d6d8..c2659978ef0c 100644
--- a/arch/powerpc/boot/opal.c
+++ b/arch/powerpc/boot/opal.c
@@ -13,7 +13,7 @@
 #include <libfdt.h>
 #include "../include/asm/opal-api.h"
 
-#ifdef __powerpc64__
+#ifdef CONFIG_PPC64_BOOT_WRAPPER
 
 /* Global OPAL struct used by opal-call.S */
 struct opal {

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: powerpc/boot: Fix build failure in 32-bit boot wrapper
  2016-11-16 18:27 [PATCH] powerpc/boot: Fix build failure in 32-bit boot wrapper Ben Hutchings
@ 2016-11-30 12:27 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2016-11-30 12:27 UTC (permalink / raw)
  To: Ben Hutchings, linuxppc-dev; +Cc: Oliver O'Halloran, stable

On Wed, 2016-11-16 at 18:27:56 UTC, Ben Hutchings wrote:
> OPAL is not callable from 32-bit mode and the assembly code for it
> may not even build (depending on how binutils was configured).
> 
> References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=powerpcspe&ver=4.8.7-1&stamp=1479203712
> Fixes: 656ad58ef19e ("powerpc/boot: Add OPAL console to epapr wrappers")
> Cc: stable <stable@vger.kernel.org> # 4.8
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/10c77dba40ff58fc03587b3b60725b

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-30 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16 18:27 [PATCH] powerpc/boot: Fix build failure in 32-bit boot wrapper Ben Hutchings
2016-11-30 12:27 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).