From e86621dc05fa00ecea168b1cc5e18d6c66b69c7b Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Thu, 26 Dec 2019 22:33:12 +0100
Subject: [PATCH] Fix definitions for ppc32

---
 arch/ppc.c     | 2 +-
 makedumpfile.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git arch/ppc.c arch/ppc.c
index 37c6a3b..4130c2d 100644
--- a/arch/ppc.c
+++ b/arch/ppc.c
@@ -19,7 +19,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#ifdef __powerpc32__
+#if defined(__powerpc__) && !defined(__powerpc64__)
 
 #include "../print_info.h"
 #include "../elf_info.h"
diff --git makedumpfile.h makedumpfile.h
index 24b2f69..d802833 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -765,7 +765,7 @@ unsigned long get_kvbase_arm64(void);
 
 #endif
 
-#ifdef __powerpc32__
+#if defined(__powerpc__) && !defined(__powerpc64__)
 
 #define __PAGE_OFFSET		(0xc0000000)
 #define KERNELBASE		PAGE_OFFSET
@@ -1054,7 +1054,7 @@ int arch_crashkernel_mem_size_ppc64(void);
 #define arch_crashkernel_mem_size()	arch_crashkernel_mem_size_ppc64()
 #endif          /* powerpc64 */
 
-#ifdef __powerpc32__ /* powerpc32 */
+#if defined(__powerpc__) && !defined(__powerpc64__)
 int get_machdep_info_ppc(void);
 unsigned long long vaddr_to_paddr_ppc(unsigned long vaddr);
 #define find_vmemmap()		stub_false()
@@ -2149,7 +2149,7 @@ int get_xen_info_ia64(void);
 
 #endif	/* __ia64 */
 
-#if defined(__powerpc64__) || defined(__powerpc32__) /* powerpcXX */
+#ifdef __powerpc__ /* powerpcXX */
 #define kvtop_xen(X)	FALSE
 #define get_xen_basic_info_arch(X) FALSE
 #define get_xen_info_arch(X) FALSE
-- 
2.24.0

