linux-next: manual merge of the char-misc tree with the powerpc tree

2012-03-15 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the char-misc tree got a conflict in
drivers/char/viotape.c between commit ba7a4822b48f ("powerpc: Remove some
of the legacy iSeries specific device drivers") from the powerpc tree and
commit 5fb15db4376f ("char: Fix typo in viotape.c") from the char-misc
tree.

The former removed this file, so I did that.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgptf0GcPURcb.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 5/5] powerpc: remove the rest of the legacy iSeries include files

2012-03-15 Thread Stephen Rothwell
since they are not referenced any more.

Signed-off-by: Stephen Rothwell 
---
 arch/powerpc/include/asm/iseries/alpaca.h   |   31 --
 arch/powerpc/include/asm/iseries/hv_call.h  |  111 
 arch/powerpc/include/asm/iseries/hv_call_sc.h   |   50 -
 arch/powerpc/include/asm/iseries/hv_call_xm.h   |   61 ---
 arch/powerpc/include/asm/iseries/hv_lp_config.h |  128 ---
 arch/powerpc/include/asm/iseries/hv_types.h |  112 
 arch/powerpc/include/asm/iseries/it_lp_queue.h  |   78 --
 arch/powerpc/include/asm/iseries/lpar_map.h |   85 ---
 arch/powerpc/include/asm/iseries/mf.h   |   51 -
 9 files changed, 0 insertions(+), 707 deletions(-)
 delete mode 100644 arch/powerpc/include/asm/iseries/alpaca.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_call.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_call_sc.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_call_xm.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_lp_config.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_types.h
 delete mode 100644 arch/powerpc/include/asm/iseries/it_lp_queue.h
 delete mode 100644 arch/powerpc/include/asm/iseries/lpar_map.h
 delete mode 100644 arch/powerpc/include/asm/iseries/mf.h

diff --git a/arch/powerpc/include/asm/iseries/alpaca.h 
b/arch/powerpc/include/asm/iseries/alpaca.h
deleted file mode 100644
index c0cce67..000
--- a/arch/powerpc/include/asm/iseries/alpaca.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright © 2008  Stephen Rothwell IBM Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- */
-#ifndef _ASM_POWERPC_ISERIES_ALPACA_H
-#define _ASM_POWERPC_ISERIES_ALPACA_H
-
-/*
- * This is the part of the paca that the iSeries hypervisor
- * needs to be statically initialised. Immediately after boot
- * we switch to the normal Linux paca.
- */
-struct alpaca {
-   struct lppaca *lppaca_ptr;  /* Pointer to LpPaca for PLIC */
-   const void *reg_save_ptr;   /* Pointer to LpRegSave for PLIC */
-};
-
-#endif /* _ASM_POWERPC_ISERIES_ALPACA_H */
diff --git a/arch/powerpc/include/asm/iseries/hv_call.h 
b/arch/powerpc/include/asm/iseries/hv_call.h
deleted file mode 100644
index 162d653..000
--- a/arch/powerpc/include/asm/iseries/hv_call.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2001  Mike Corrigan IBM Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- * This file contains the "hypervisor call" interface which is used to
- * drive the hypervisor from the OS.
- */
-#ifndef _ASM_POWERPC_ISERIES_HV_CALL_H
-#define _ASM_POWERPC_ISERIES_HV_CALL_H
-
-#include 
-#include 
-#include 
-
-/* Type of yield for HvCallBaseYieldProcessor */
-#define HvCall_YieldTimed  0   /* Yield until specified time (tb) */
-#define HvCall_YieldToActive   1   /* Yield until all active procs have 
run */
-#define HvCall_YieldToProc 2   /* Yield until the specified processor 
has run */
-
-/* interrupt masks for setEnabledInterrupts */
-#define HvCall_MaskIPI 0x0001
-#define HvCall_MaskLpEvent 0x0002
-#define HvCall_MaskLpProd  0x0004
-#define HvCall_MaskTimeout 0x0008
-
-/* Log buffer formats */
-#define HvCall_LogBuffer_ASCII  0
-#define HvCall_LogBuffer_EBCDIC 1
-
-#define HvCallBaseAckDeferredInts  HvCallBase +  0
-#define HvCallBaseCpmPowerOff  HvCallBase +  1
-#define HvCallBaseGetHwPatch   HvCallBase +  2
-#define HvCallBaseReIplSpAttn   

[PATCH 4/5] powerpc: remove the remaining CONFIG_PPC_ISERIES pieces

2012-03-15 Thread Stephen Rothwell

Signed-off-by: Stephen Rothwell 
---
 arch/powerpc/boot/Makefile  |9 +
 arch/powerpc/include/asm/dma.h  |4 
 arch/powerpc/include/asm/lppaca.h   |8 
 arch/powerpc/include/asm/spinlock.h |5 ++---
 arch/powerpc/kernel/asm-offsets.c   |   14 --
 5 files changed, 3 insertions(+), 37 deletions(-)

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 8844a17..6042e93 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -184,7 +184,6 @@ image-$(CONFIG_PPC_EFIKA)   += zImage.chrp
 image-$(CONFIG_PPC_PMAC)   += zImage.pmac
 image-$(CONFIG_PPC_HOLLY)  += dtbImage.holly
 image-$(CONFIG_PPC_PRPMC2800)  += dtbImage.prpmc2800
-image-$(CONFIG_PPC_ISERIES)+= zImage.iseries
 image-$(CONFIG_DEFAULT_UIMAGE) += uImage
 image-$(CONFIG_EPAPR_BOOT) += zImage.epapr
 
@@ -311,12 +310,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/%.dtb
 $(obj)/vmlinux.strip: vmlinux
$(STRIP) -s -R .comment $< -o $@
 
-# The iseries hypervisor won't take an ET_DYN executable, so this
-# changes the type (byte 17) in the file to ET_EXEC (2).
-$(obj)/zImage.iseries: vmlinux
-   $(STRIP) -s -R .comment $< -o $@
-   printf "\x02" | dd of=$@ conv=notrunc bs=1 seek=17
-
 $(obj)/uImage: vmlinux $(wrapperbits)
$(call if_changed,wrap,uboot)
 
@@ -364,7 +357,7 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
 # anything not in $(targets)
 clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
-   zImage.iseries zImage.miboot zImage.pmac zImage.pseries \
+   zImage.miboot zImage.pmac zImage.pseries \
zImage.maple simpleImage.* otheros.bld *.dtb
 
 # clean up files cached by wrapper
diff --git a/arch/powerpc/include/asm/dma.h b/arch/powerpc/include/asm/dma.h
index a7e06e2..adadb99 100644
--- a/arch/powerpc/include/asm/dma.h
+++ b/arch/powerpc/include/asm/dma.h
@@ -34,8 +34,6 @@
 /* Doesn't really apply... */
 #define MAX_DMA_ADDRESS(~0UL)
 
-#if !defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI)
-
 #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER
 #define dma_outb   outb_p
 #else
@@ -354,7 +352,5 @@ extern int isa_dma_bridge_buggy;
 #define isa_dma_bridge_buggy   (0)
 #endif
 
-#endif /* !defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI) */
-
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_DMA_H */
diff --git a/arch/powerpc/include/asm/lppaca.h 
b/arch/powerpc/include/asm/lppaca.h
index e0298d2..a76254a 100644
--- a/arch/powerpc/include/asm/lppaca.h
+++ b/arch/powerpc/include/asm/lppaca.h
@@ -41,15 +41,7 @@
  * We only have to have statically allocated lppaca structs on
  * legacy iSeries, which supports at most 64 cpus.
  */
-#ifdef CONFIG_PPC_ISERIES
-#if NR_CPUS < 64
-#define NR_LPPACAS NR_CPUS
-#else
-#define NR_LPPACAS 64
-#endif
-#else /* not iSeries */
 #define NR_LPPACAS 1
-#endif
 
 
 /* The Hypervisor barfs if the lppaca crosses a page boundary.  A 1k
diff --git a/arch/powerpc/include/asm/spinlock.h 
b/arch/powerpc/include/asm/spinlock.h
index f9611bd..7124fc0 100644
--- a/arch/powerpc/include/asm/spinlock.h
+++ b/arch/powerpc/include/asm/spinlock.h
@@ -23,7 +23,6 @@
 #ifdef CONFIG_PPC64
 #include 
 #include 
-#include 
 #endif
 #include 
 #include 
@@ -95,12 +94,12 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
  * value.
  */
 
-#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES)
+#if defined(CONFIG_PPC_SPLPAR)
 /* We only yield to the hypervisor if we are in shared processor mode */
 #define SHARED_PROCESSOR (get_lppaca()->shared_proc)
 extern void __spin_yield(arch_spinlock_t *lock);
 extern void __rw_yield(arch_rwlock_t *lock);
-#else /* SPLPAR || ISERIES */
+#else /* SPLPAR */
 #define __spin_yield(x)barrier()
 #define __rw_yield(x)  barrier()
 #define SHARED_PROCESSOR   0
diff --git a/arch/powerpc/kernel/asm-offsets.c 
b/arch/powerpc/kernel/asm-offsets.c
index cdd0d26..cc492e4 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -46,9 +46,6 @@
 #include 
 #include 
 #endif
-#ifdef CONFIG_PPC_ISERIES
-#include 
-#endif
 #ifdef CONFIG_PPC_POWERNV
 #include 
 #endif
@@ -384,17 +381,6 @@ int main(void)
DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
 #endif
 
-#ifdef CONFIG_PPC_ISERIES
-   /* the assembler miscalculates the VSID values */
-   DEFINE(PAGE_OFFSET_ESID, GET_ESID(PAGE_OFFSET));
-   DEFINE(PAGE_OFFSET_VSID, KERNEL_VSID(PAGE_OFFSET));
-   DEFINE(VMALLOC_START_ESID, GET_ESID(VMALLOC_START));
-   DEFINE(VMALLOC_START_VSID, KERNEL_VSID(VMALLOC_START));
-
-   /* alpaca */
-   DEFINE(ALPACA_SIZE, sizeof(struct alpaca));
-#endif
-
DEFINE(PGD_TABLE_SIZE, PGD_TABLE_SIZE);
DEFINE(PTE_SIZE, sizeof(pte_t));
 
-- 
1.7.9.1

-- 
Cheers,
Stephen Rothwells...@canb.auug.o

[PATCH 3/5] init: remove CONFIG_PPC_ISERIES

2012-03-15 Thread Stephen Rothwell
It is no longer selectable, so remove the check for it.

Signed-off-by: Stephen Rothwell 
---
 init/do_mounts_rd.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index 887629e..01f1306 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -178,7 +178,7 @@ int __init rd_load_image(char *from)
char *buf = NULL;
unsigned short rotate = 0;
decompress_fn decompressor = NULL;
-#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES)
+#if !defined(CONFIG_S390)
char rotator[4] = { '|' , '/' , '-' , '\\' };
 #endif
 
@@ -264,7 +264,7 @@ int __init rd_load_image(char *from)
}
sys_read(in_fd, buf, BLOCK_SIZE);
sys_write(out_fd, buf, BLOCK_SIZE);
-#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES)
+#if !defined(CONFIG_S390)
if (!(i % 16)) {
printk("%c\b", rotator[rotate & 0x3]);
rotate++;
-- 
1.7.9.1

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/


pgplAehFPqLvj.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 2/5] powerpc: remove FW_FEATURE ISERIES from arch code

2012-03-15 Thread Stephen Rothwell
This is no longer selectable, so just remove all the dependent code.

Signed-off-by: Stephen Rothwell 
---
 arch/powerpc/include/asm/abs_addr.h   |   21 +--
 arch/powerpc/include/asm/firmware.h   |9 ---
 arch/powerpc/include/asm/time.h   |   15 -
 arch/powerpc/kernel/irq.c |   14 
 arch/powerpc/kernel/isa-bridge.c  |3 -
 arch/powerpc/kernel/lparcfg.c |  108 ++--
 arch/powerpc/kernel/paca.c|   12 +---
 arch/powerpc/kernel/pci-common.c  |   15 -
 arch/powerpc/kernel/sysfs.c   |7 +--
 arch/powerpc/kernel/time.c|  108 +
 arch/powerpc/lib/locks.c  |   24 ++--
 arch/powerpc/mm/hash_utils_64.c   |9 +--
 arch/powerpc/mm/slb.c |6 --
 arch/powerpc/mm/stab.c|9 ---
 arch/powerpc/oprofile/common.c|3 -
 arch/powerpc/platforms/powernv/pci.c  |1 +
 arch/powerpc/platforms/pseries/lpar.c |1 +
 arch/powerpc/xmon/xmon.c  |   28 -
 18 files changed, 26 insertions(+), 367 deletions(-)

diff --git a/arch/powerpc/include/asm/abs_addr.h 
b/arch/powerpc/include/asm/abs_addr.h
index 5ab0b71..9d92ba0 100644
--- a/arch/powerpc/include/asm/abs_addr.h
+++ b/arch/powerpc/include/asm/abs_addr.h
@@ -17,7 +17,6 @@
 #include 
 #include 
 #include 
-#include 
 
 struct mschunks_map {
 unsigned long num_chunks;
@@ -46,30 +45,12 @@ static inline unsigned long addr_to_chunk(unsigned long 
addr)
 
 static inline unsigned long phys_to_abs(unsigned long pa)
 {
-   unsigned long chunk;
-
-   /* This is a no-op on non-iSeries */
-   if (!firmware_has_feature(FW_FEATURE_ISERIES))
-   return pa;
-
-   chunk = addr_to_chunk(pa);
-
-   if (chunk < mschunks_map.num_chunks)
-   chunk = mschunks_map.mapping[chunk];
-
-   return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK);
+   return pa;
 }
 
 /* Convenience macros */
 #define virt_to_abs(va) phys_to_abs(__pa(va))
 #define abs_to_virt(aa) __va(aa)
 
-/*
- * Converts Virtual Address to Real Address for
- * Legacy iSeries Hypervisor calls
- */
-#define iseries_hv_addr(virtaddr)  \
-   (0x8000UL | virt_to_abs(virtaddr))
-
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_ABS_ADDR_H */
diff --git a/arch/powerpc/include/asm/firmware.h 
b/arch/powerpc/include/asm/firmware.h
index 14db29b..ad0b751 100644
--- a/arch/powerpc/include/asm/firmware.h
+++ b/arch/powerpc/include/asm/firmware.h
@@ -41,7 +41,6 @@
 #define FW_FEATURE_XDABR   ASM_CONST(0x0004)
 #define FW_FEATURE_MULTITCEASM_CONST(0x0008)
 #define FW_FEATURE_SPLPAR  ASM_CONST(0x0010)
-#define FW_FEATURE_ISERIES ASM_CONST(0x0020)
 #define FW_FEATURE_LPARASM_CONST(0x0040)
 #define FW_FEATURE_PS3_LV1 ASM_CONST(0x0080)
 #define FW_FEATURE_BEATASM_CONST(0x0100)
@@ -65,8 +64,6 @@ enum {
FW_FEATURE_MULTITCE | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR |
FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO,
FW_FEATURE_PSERIES_ALWAYS = 0,
-   FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
-   FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv2,
FW_FEATURE_POWERNV_ALWAYS = 0,
FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
@@ -79,9 +76,6 @@ enum {
 #ifdef CONFIG_PPC_PSERIES
FW_FEATURE_PSERIES_POSSIBLE |
 #endif
-#ifdef CONFIG_PPC_ISERIES
-   FW_FEATURE_ISERIES_POSSIBLE |
-#endif
 #ifdef CONFIG_PPC_POWERNV
FW_FEATURE_POWERNV_POSSIBLE |
 #endif
@@ -99,9 +93,6 @@ enum {
 #ifdef CONFIG_PPC_PSERIES
FW_FEATURE_PSERIES_ALWAYS &
 #endif
-#ifdef CONFIG_PPC_ISERIES
-   FW_FEATURE_ISERIES_ALWAYS &
-#endif
 #ifdef CONFIG_PPC_POWERNV
FW_FEATURE_POWERNV_ALWAYS &
 #endif
diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h
index 7eb10fb..2136f58 100644
--- a/arch/powerpc/include/asm/time.h
+++ b/arch/powerpc/include/asm/time.h
@@ -18,11 +18,6 @@
 #include 
 
 #include 
-#ifdef CONFIG_PPC_ISERIES
-#include 
-#include 
-#include 
-#endif
 
 /* time.c */
 extern unsigned long tb_ticks_per_jiffy;
@@ -167,15 +162,6 @@ static inline void set_dec(int val)
 #ifndef CONFIG_BOOKE
--val;
 #endif
-#ifdef CONFIG_PPC_ISERIES
-   if (firmware_has_feature(FW_FEATURE_ISERIES) &&
-   get_lppaca()->shared_proc) {
-   get_lppaca()->virtual_decr = val;
-   if (get_dec() > val)
-   HvCall_setVirtualDecr();
-   return;
-   }
-#endif
mtspr(SPRN_DEC, val);
 #endif /* not 40x or 8xx_CPU6 */
 }
@@ -217,7 +203,6 @@ DECLARE_PER_CPU(struct cpu_usage, cpu_usa

[PATCH 1/5] tty/hvc_vio: FW_FEATURE_ISERIES is no longer selectable

2012-03-15 Thread Stephen Rothwell
so remove the code that tests for it.

Cc: Greg Kroah-Hartman 
Signed-off-by: Stephen Rothwell 
---
 drivers/tty/hvc/hvc_vio.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

Greg, it is probably easiest for this to go through the powerpc tree.

diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index fc3c3ad..3a0d53d 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -46,7 +46,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -322,9 +321,6 @@ static int __init hvc_vio_init(void)
 {
int rc;
 
-   if (firmware_has_feature(FW_FEATURE_ISERIES))
-   return -EIO;
-
/* Register as a vio device to receive callbacks */
rc = vio_register_driver(&hvc_vio_driver);
 
-- 
1.7.9.1

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/


pgpvNUX2zboN7.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 0/5] powerpc: clean up almos all the rest of the iSeries platform code

2012-03-15 Thread Stephen Rothwell
Hi all,

This series removes almost all the remaining code that is part of the
legacy iSeries platform.

 arch/powerpc/boot/Makefile  |9 +--
 arch/powerpc/include/asm/abs_addr.h |   21 +
 arch/powerpc/include/asm/dma.h  |4 -
 arch/powerpc/include/asm/firmware.h |9 --
 arch/powerpc/include/asm/iseries/alpaca.h   |   31 --
 arch/powerpc/include/asm/iseries/hv_call.h  |  111 
 arch/powerpc/include/asm/iseries/hv_call_sc.h   |   50 -
 arch/powerpc/include/asm/iseries/hv_call_xm.h   |   61 ---
 arch/powerpc/include/asm/iseries/hv_lp_config.h |  128 ---
 arch/powerpc/include/asm/iseries/hv_types.h |  112 
 arch/powerpc/include/asm/iseries/it_lp_queue.h  |   78 --
 arch/powerpc/include/asm/iseries/lpar_map.h |   85 ---
 arch/powerpc/include/asm/iseries/mf.h   |   51 -
 arch/powerpc/include/asm/lppaca.h   |8 --
 arch/powerpc/include/asm/spinlock.h |5 +-
 arch/powerpc/include/asm/time.h |   15 ---
 arch/powerpc/kernel/asm-offsets.c   |   14 ---
 arch/powerpc/kernel/irq.c   |   14 ---
 arch/powerpc/kernel/isa-bridge.c|3 -
 arch/powerpc/kernel/lparcfg.c   |  108 ++--
 arch/powerpc/kernel/paca.c  |   12 +--
 arch/powerpc/kernel/pci-common.c|   15 ---
 arch/powerpc/kernel/sysfs.c |7 +-
 arch/powerpc/kernel/time.c  |  108 +---
 arch/powerpc/lib/locks.c|   24 +
 arch/powerpc/mm/hash_utils_64.c |9 +-
 arch/powerpc/mm/slb.c   |6 -
 arch/powerpc/mm/stab.c  |9 --
 arch/powerpc/oprofile/common.c  |3 -
 arch/powerpc/platforms/powernv/pci.c|1 +
 arch/powerpc/platforms/pseries/lpar.c   |1 +
 arch/powerpc/xmon/xmon.c|   28 -
 drivers/tty/hvc/hvc_vio.c   |4 -
 init/do_mounts_rd.c |4 +-
 34 files changed, 31 insertions(+), 1117 deletions(-)

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpOSytpuoVKH.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

linux-next: manual merge of the trivial tree with the powerpc tree

2012-03-15 Thread Stephen Rothwell
Hi Jiri,

Today's linux-next merge of the trivial tree got a conflict in
drivers/char/viotape.c between commit ba7a4822b48f ("powerpc: Remove some
of the legacy iSeries specific device drivers") from the powerpc tree and
commit a7ccf3775219 ("char: Fix typo in viotape.c") from the trivial tree.

The former commit removed the file, so I did that.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpdX7aBcz9Ij.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] Device Tree Bindings for Freescale TDM controller

2012-03-15 Thread Poonam Aggrwal
From: Poonam Aggrwal  

This TDM controller is available in various Freescale SOCs like MPC8315, P1020,
P1022, P1010.

Signed-off-by: Sandeep Singh 
Signed-off-by: Poonam Aggrwal 
---
 Documentation/devicetree/bindings/tdm/fsl-tdm.txt |   71 +
 1 files changed, 71 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/tdm/fsl-tdm.txt

diff --git a/Documentation/devicetree/bindings/tdm/fsl-tdm.txt 
b/Documentation/devicetree/bindings/tdm/fsl-tdm.txt
new file mode 100644
index 000..61431e3
--- /dev/null
+++ b/Documentation/devicetree/bindings/tdm/fsl-tdm.txt
@@ -0,0 +1,71 @@
+=
+TDM Device Tree Binding
+Copyright (C) 2012 Freescale Semiconductor Inc.
+
+NOTE: The bindings described in this document are preliminary
+and subject to change.
+
+=
+TDM (Time Division Multiplexing)
+
+DESCRIPTION
+
+The TDM is full duplex serial port designed to allow various devices including
+digital signal processors (DSPs) to communicate with a variety of serial 
devices
+including industry standard framers, codecs, other DSPs and microprocessors.
+
+The below properties describe the device tree bindings for Freescale TDM
+controller.
+This TDM controller is available on various Freescale Processors like
+MPC8313, P1020, P1022 and P1010.
+
+PROPERTIES
+
+  - compatible
+  Usage: required
+  Value type: 
+  Definition: Should contain "fsl,mpc8315-tdm".
+ So mpc8313 will have compatible = "fsl,mpc8315-tdm";
+ p1010 will have compatible "fsl,p1010-tdm", "fsl,mpc8315-tdm";
+
+  - reg
+  Usage: required
+  Value type: 
+  Definition: A standard property. Specifies the physical address
+ offset and length of the TDM registers and TDM DMAC registers for
+ the device.
+
+  - clock-frequency
+  Usage: optional
+  Value type: 
+  Definition: The frequency at which the TDM block is operating.
+
+  - interrupts
+  Usage: required
+  Value type: 
+  Definition: This field defines two interrupt specifiers namely interrupt
+ number and interrupt type for TDM error and TDM DMAC.
+
+  - phy-handle
+  Usage: optional
+  Value type: 
+  Definition: Phandle of the line controller node or framer node eg. SLIC,
+ E1\T1 etc.
+
+  - fsl-max-time-slots
+  Usage: required
+  Value type: 
+  Definition: Maximum number of 8-bit time slots in one TDM frame.
+ This is the maximum number which TDM hardware supports.
+
+EXAMPLE
+
+   tdm@16000 {
+   device_type = "tdm";
+   compatible = "fsl,p1010-tdm", "fsl,mpc8315-tdm";
+   reg = <0x16000 0x200 0x2c000 0x2000>;
+   clock-frequency = <0>;
+   interrupts = <16 8 62 8>;
+   phy-handle = 
+   fsl-max-time-slots = <128>
+   };
-- 
1.5.6.5


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] powerpc/epapr: add "memory" as a clobber to all hypercalls

2012-03-15 Thread Timur Tabi
The "memory" clobber tells the compiler to ensure that all writes to memory
are committed before the hypercall is made.

"memory" is only necessary for hcalls where the Hypervisor will read or
write guest memory. However, we add it to all hcalls because the impact is
minimal, and we want to ensure that it's present for the hcalls that need it.

Signed-off-by: Timur Tabi 
---
 arch/powerpc/include/asm/epapr_hcalls.h |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/include/asm/epapr_hcalls.h 
b/arch/powerpc/include/asm/epapr_hcalls.h
index f3b0c2c..976835d 100644
--- a/arch/powerpc/include/asm/epapr_hcalls.h
+++ b/arch/powerpc/include/asm/epapr_hcalls.h
@@ -134,10 +134,15 @@
  * whether they will be clobbered.
  *
  * Note that r11 can be used as an output parameter.
+ *
+ * The "memory" clobber is only necessary for hcalls where the Hypervisor
+ * will read or write guest memory. However, we add it to all hcalls because
+ * the impact is minimal, and we want to ensure that it's present for the
+ * hcalls that need it.
 */
 
 /* List of common clobbered registers.  Do not use this macro. */
-#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc"
+#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc", "memory"
 
 #define EV_HCALL_CLOBBERS8 EV_HCALL_CLOBBERS
 #define EV_HCALL_CLOBBERS7 EV_HCALL_CLOBBERS8, "r10"
-- 
1.7.3.4


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] powerpc: Fix power4/970 idle code regression with lockdep

2012-03-15 Thread Benjamin Herrenschmidt
in commit 7230c5644188cd9e3fb380cc97dde00c464a3ba7
"powerpc: Rework lazy-interrupt handling"

I introduced a regression, accidentally calling irq tracing twice
and not properly restoring a clobbered register (r7) later used
for writing to the MSR.

This caused lockups when booting on a G5 with lockdep enabled.

Signed-off-by: Benjamin Herrenschmidt 
---
 arch/powerpc/kernel/idle_power4.S |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/idle_power4.S 
b/arch/powerpc/kernel/idle_power4.S
index d8cdba4c2..2c71b0f 100644
--- a/arch/powerpc/kernel/idle_power4.S
+++ b/arch/powerpc/kernel/idle_power4.S
@@ -50,9 +50,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_CAN_NAP)
addir1,r1,128
ld  r0,16(r1)
mtlrr0
+   mfmsr   r7
 #endif /* CONFIG_TRACE_IRQFLAGS */
 
-   TRACE_ENABLE_INTS
li  r0,1
stb r0,PACASOFTIRQEN(r13)   /* we'll hard-enable shortly */
 BEGIN_FTR_SECTION
-- 
1.7.9



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 21/38] Disintegrate asm/system.h for PowerPC [ver #3]

2012-03-15 Thread Stephen Rothwell
Hi Dave,

On Thu, 15 Mar 2012 20:58:32 + David Howells  wrote:
>
>  arch/powerpc/platforms/iseries/dt.c   |1 
>  arch/powerpc/platforms/iseries/lpevents.c |1 
>  arch/powerpc/platforms/iseries/setup.c|1 
>  arch/powerpc/platforms/iseries/smp.c  |1 
>  arch/powerpc/platforms/iseries/viopath.c  |1 

I don't expect you to change your series (now, anyway), but just a heads
up that all those files have been removed in the powerpc tree.

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/


pgpRjJ6Ist0bb.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 2/2] powerpc/p2020rdb p1010rdb: lower spi flash freq to 40Mhz

2012-03-15 Thread Sebastian Andrzej Siewior
This is here most likely since the FSL bsp. Back in the FSL bsp it was
set to 50Mhz and working. However the driver divided the SoC freq. only
by 2. According to the TRM the platform clock (which the manual refers
in its formula) is the system clock divided by two. So in the end it has
to divide by 4 and this is what the fsl-spi driver in tree is doing.
Since then the flash is not wokring I guess. After chaning the freq from
50Mhz to 40Mhz like others do then I can access the flash.

Signed-off-by: Sebastian Andrzej Siewior 
---
 arch/powerpc/boot/dts/p1010rdb.dtsi |2 +-
 arch/powerpc/boot/dts/p2020rdb.dts  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/boot/dts/p1010rdb.dtsi 
b/arch/powerpc/boot/dts/p1010rdb.dtsi
index d4c4a77..1c41ef0 100644
--- a/arch/powerpc/boot/dts/p1010rdb.dtsi
+++ b/arch/powerpc/boot/dts/p1010rdb.dtsi
@@ -138,7 +138,7 @@
#size-cells = <1>;
compatible = "spansion,s25sl12801";
reg = <0>;
-   spi-max-frequency = <5000>;
+   spi-max-frequency = <4000>;
 
partition@0 {
/* 1MB for u-boot Bootloader Image */
diff --git a/arch/powerpc/boot/dts/p2020rdb.dts 
b/arch/powerpc/boot/dts/p2020rdb.dts
index 8f25ef2..153bc76 100644
--- a/arch/powerpc/boot/dts/p2020rdb.dts
+++ b/arch/powerpc/boot/dts/p2020rdb.dts
@@ -157,7 +157,7 @@
#size-cells = <1>;
compatible = "spansion,s25sl12801";
reg = <0>;
-   spi-max-frequency = <5000>;
+   spi-max-frequency = <4000>;
 
partition@0 {
/* 512KB for u-boot Bootloader Image */
-- 
1.7.9.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 1/2] powerpc/p2020rdb: move the NAND address.

2012-03-15 Thread Sebastian Andrzej Siewior
It is not at 0xffa0. According to current u-boot source the NAND
controller is always at 0xff80 and it is either at CS0 or CS1
depending on NAND or NAND+NOR mode. In 36bit mode it is shifted to
0xfff80 but it has always an eight there and never an A.

Signed-off-by: Sebastian Andrzej Siewior 
---
 arch/powerpc/boot/dts/p2020rdb.dts |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/dts/p2020rdb.dts 
b/arch/powerpc/boot/dts/p2020rdb.dts
index eb8a6aa..8f25ef2 100644
--- a/arch/powerpc/boot/dts/p2020rdb.dts
+++ b/arch/powerpc/boot/dts/p2020rdb.dts
@@ -34,7 +34,7 @@
 
/* NOR and NAND Flashes */
ranges = <0x0 0x0 0x0 0xef00 0x0100
- 0x1 0x0 0x0 0xffa0 0x0004
+ 0x1 0x0 0x0 0xff80 0x0004
  0x2 0x0 0x0 0xffb0 0x0002>;
 
nor@0,0 {
-- 
1.7.9.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v3] ipc: provide generic compat versions of IPC syscalls

2012-03-15 Thread Arnd Bergmann
On Thursday 15 March 2012, Chris Metcalf wrote:
> 
> Somewhat belatedly, I'm looking to push this through the "tile" tree. 
> Andrew Morton has been keeping it in his tree but I figure I should push it
> since it directly affects "tile" and currently no one else.

Sounds good.

> However, it would be nice if anyone could provide a Reviewed-by or Acked-by
> on the patch.  Thanks!

As the main author of ipc/compat.c in its current form,

Reviewed-by: Arnd Bergmann 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 0/2] Kdump support for PPC_47x

2012-03-15 Thread Suzuki K. Poulose

On 03/15/2012 11:41 AM, Tony Breeds wrote:

On Wed, Mar 14, 2012 at 03:52:30PM +0530, Suzuki K. Poulose wrote:

The following series implements Kexec/Kdump support for
PPC_47x based platforms. Doesn't support SMP yet.

I have tested these patches on simics simulator for ppc476.


I'll test these patches on the currituck board I have here early next
week.


Thanks a lot Tony !

Suzuki

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 2/2] powerpc/44x: Add support PCI-E for APM821xx SoC and Bluestone board

2012-03-15 Thread Vinh Nguyen Huu Tuong
This patch extends PCI-E driver to support PCI-E for APM821xx SoC on Bluestone 
board.
Notes: this patch includes the fix base on Duc comment.
Signed-off-by: Vinh Nguyen Huu Tuong 
---
 arch/powerpc/platforms/44x/Kconfig |1 +
 arch/powerpc/sysdev/ppc4xx_pci.c   |   70 
 2 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/44x/Kconfig 
b/arch/powerpc/platforms/44x/Kconfig
index 5d5aaf6..c1e9896 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -23,6 +23,7 @@ config BLUESTONE
default n
select PPC44x_SIMPLE
select APM821xx
+   select PPC4xx_PCI_EXPRESS
select IBM_EMAC_RGMII
help
  This option enables support for the APM APM821xx Evaluation board.
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
index 4f05f75..ed3ca9e 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.c
+++ b/arch/powerpc/sysdev/ppc4xx_pci.c
@@ -1050,6 +1050,74 @@ static struct ppc4xx_pciex_hwops ppc460ex_pcie_hwops 
__initdata =
.check_link = ppc4xx_pciex_check_link_sdr,
 };
 
+static int __init apm821xx_pciex_core_init(struct device_node *np)
+{
+   /* Return the number of pcie port */
+   return 1;
+}
+
+static int apm821xx_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
+{
+   u32 val;
+
+   /*
+* Do a software reset on PCIe ports.
+* This code is to fix the issue that pci drivers doesn't re-assign
+* bus number for PCIE devices after Uboot
+* scanned and configured all the buses (eg. PCIE NIC IntelPro/1000
+* PT quad port, SAS LSI 1064E)
+*/
+
+   mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x0);
+   mdelay(10);
+
+   if (port->endpoint)
+   val = PTYPE_LEGACY_ENDPOINT << 20;
+   else
+   val = PTYPE_ROOT_PORT << 20;
+
+   val |= LNKW_X1 << 12;
+
+   mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET, val);
+   mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, 0x);
+   mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x0101);
+
+   mtdcri(SDR0, PESDR0_460EX_L0CDRCTL, 0x3230);
+   mtdcri(SDR0, PESDR0_460EX_L0DRV, 0x0130);
+   mtdcri(SDR0, PESDR0_460EX_L0CLK, 0x0006);
+
+   mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x1000);
+   mdelay(50);
+   mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x3000);
+
+   mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
+   mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) |
+   (PESDRx_RCSSET_RSTGU | PESDRx_RCSSET_RSTPYN));
+
+   /* Poll for PHY reset */
+   val = PESDR0_460EX_RSTSTA - port->sdr_base;
+   if (ppc4xx_pciex_wait_on_sdr(port, val, 0x1, 1, 100)) {
+   printk(KERN_WARNING "PCIE: Can't reset PHY\n");
+   return -EBUSY;
+   } else {
+   mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
+   (mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) &
+   ~(PESDRx_RCSSET_RSTGU | PESDRx_RCSSET_RSTDL)) |
+   PESDRx_RCSSET_RSTPYN);
+
+   port->has_ibpre = 1;
+   return 0;
+   }
+}
+
+static struct ppc4xx_pciex_hwops apm821xx_pcie_hwops __initdata = {
+   .want_sdr   = true,
+   .core_init  = apm821xx_pciex_core_init,
+   .port_init_hw   = apm821xx_pciex_init_port_hw,
+   .setup_utl  = ppc460ex_pciex_init_utl,
+   .check_link = ppc4xx_pciex_check_link_sdr,
+};
+
 static int __init ppc460sx_pciex_core_init(struct device_node *np)
 {
/* HSS drive amplitude */
@@ -1362,6 +1430,8 @@ static int __init ppc4xx_pciex_check_core_init(struct 
device_node *np)
ppc4xx_pciex_hwops = &ppc460ex_pcie_hwops;
if (of_device_is_compatible(np, "ibm,plb-pciex-460sx"))
ppc4xx_pciex_hwops = &ppc460sx_pcie_hwops;
+   if (of_device_is_compatible(np, "ibm,plb-pciex-apm821xx"))
+   ppc4xx_pciex_hwops = &apm821xx_pcie_hwops;
 #endif /* CONFIG_44x*/
 #ifdef CONFIG_40x
if (of_device_is_compatible(np, "ibm,plb-pciex-405ex"))
-- 
1.7.2.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 1/2] powerpc/44x: Add additional support for APM821xx SoC and Bluestone board

2012-03-15 Thread Vinh Nguyen Huu Tuong
This patch updates the dts file for bluestone board with support:
- UART1
- L2 cache
- NAND with NDFC
- PCI-E

Signed-off-by: Vinh Nguyen Huu Tuong 
---
 arch/powerpc/boot/dts/bluestone.dts |  127 ++-
 1 files changed, 125 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/boot/dts/bluestone.dts 
b/arch/powerpc/boot/dts/bluestone.dts
index 2a56a0d..cfa23bf 100644
--- a/arch/powerpc/boot/dts/bluestone.dts
+++ b/arch/powerpc/boot/dts/bluestone.dts
@@ -33,7 +33,7 @@
aliases {
ethernet0 = &EMAC0;
serial0 = &UART0;
-   //serial1 = &UART1; --gcl missing UART1 label
+   serial1 = &UART1;
};
 
cpus {
@@ -52,7 +52,7 @@
d-cache-size = <32768>;
dcr-controller;
dcr-access-method = "native";
-   //next-level-cache = <&L2C0>; --gcl missing L2C0 label
+   next-level-cache = <&L2C0>;
};
};
 
@@ -117,6 +117,16 @@
dcr-reg = <0x00c 0x002>;
};
 
+   L2C0: l2c {
+   compatible = "ibm,l2-cache-apm82181", "ibm,l2-cache";
+   dcr-reg = <0x020 0x008
+  0x030 0x008>;
+   cache-line-size = <32>;
+   cache-size = <262144>;
+   interrupt-parent = <&UIC1>;
+   interrupts = <11 1>;
+   };
+
plb {
compatible = "ibm,plb4";
#address-cells = <2>;
@@ -182,6 +192,53 @@
reg = <0x001a 0x0006>;
};
};
+
+   ndfc@1,0 {
+   compatible = "ibm,ndfc";
+   reg = <0x0003 0x 
0x2000>;
+   ccr = <0x1000>;
+   bank-settings = <0x8000>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   /* 2Gb Nand Flash */
+   nand {
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "firmware";
+   reg   = <0x 
0x00C0>;
+   };
+   partition@c0 {
+   label = "environment";
+   reg   = <0x00C0 
0x00B0>;
+   };
+   partition@170 {
+   label = "kernel";
+   reg   = <0x0170 
0x00E0>;
+   };
+   partition@250 {
+   label = "root";
+   reg   = <0x0250 
0x0820>;
+   };
+   partition@a70 {
+   label = "device-tree";
+   reg   = <0x0A70 
0x00B0>;
+   };
+   partition@b20 {
+   label = "config";
+   reg   = <0x0B20 
0x00D0>;
+   };
+   partition@bf0 {
+   label = "diag";
+   reg   = <0x0BF0 
0x00C0>;
+   };
+   partition@cb0 {
+   label = "vendor";
+   reg   = <0x0CB0 
0x350>;
+   };
+   };
+   };
};
 
UART0: serial@ef600300 {
@@ -195,11 +252,36 @@
interrupts = <0x1 0x4>;
};
 
+   UART1: serial@ef600400 {
+ 

Re: [PATCH 2/5] ppc: move DEBUG code to --debug

2012-03-15 Thread Simon Horman
[CC linuxppc-...@ozlabs.org]

On Thu, Mar 08, 2012 at 02:39:39PM +0800, Cong Wang wrote:
> Like patch 1/5, this one moves code under #if DEBUG to --debug
> on ppc arch.
> 
> Signed-off-by: Cong Wang 
> ---
>  kexec/arch/ppc/crashdump-powerpc.c |   18 --
>  kexec/arch/ppc/fixup_dtb.c |   25 +++--
>  kexec/arch/ppc/fs2dt.c |6 +++---
>  kexec/arch/ppc/kexec-ppc.c |   17 -
>  kexec/arch/ppc/libfdt-wrapper.c|4 ++--
>  kexec/arch/ppc64/crashdump-ppc64.c |   16 ++--
>  kexec/arch/ppc64/kexec-elf-ppc64.c |   23 +++
>  kexec/arch/ppc64/kexec-ppc64.c |9 +++--
>  8 files changed, 52 insertions(+), 66 deletions(-)
> 
> diff --git a/kexec/arch/ppc/crashdump-powerpc.c 
> b/kexec/arch/ppc/crashdump-powerpc.c
> index 7c9dbff..1bef69b 100644
> --- a/kexec/arch/ppc/crashdump-powerpc.c
> +++ b/kexec/arch/ppc/crashdump-powerpc.c
> @@ -226,15 +226,15 @@ static int get_crash_memory_ranges(struct memory_range 
> **range, int *ranges)
>  
>   *range = crash_memory_range;
>   *ranges = memory_ranges;
> -#if DEBUG
> +
>   int j;
> - printf("CRASH MEMORY RANGES\n");
> + dbgprintf("CRASH MEMORY RANGES\n");
>   for (j = 0; j < *ranges; j++) {
>   start = crash_memory_range[j].start;
>   end = crash_memory_range[j].end;
> - fprintf(stderr, "%016Lx-%016Lx\n", start, end);
> + dbgprintf("%016Lx-%016Lx\n", start, end);
>   }
> -#endif
> +
>   return 0;
>  
>  err:
> @@ -289,9 +289,9 @@ static int add_cmdline_param(char *cmdline, unsigned long 
> long addr,
>   if (cmdlen > (COMMAND_LINE_SIZE - 1))
>   die("Command line overflow\n");
>   strcat(cmdline, str);
> -#if DEBUG
> - fprintf(stderr, "Command line after adding elfcorehdr: %s\n", cmdline);
> -#endif
> +
> + dbgprintf("Command line after adding elfcorehdr: %s\n", cmdline);
> +
>   return 0;
>  }
>  
> @@ -403,10 +403,8 @@ void add_usable_mem_rgns(unsigned long long base, 
> unsigned long long size)
>   usablemem_rgns.ranges[usablemem_rgns.size].start = base;
>   usablemem_rgns.ranges[usablemem_rgns.size++].end = end;
>  
> -#ifdef DEBUG
> - fprintf(stderr, "usable memory rgns size:%u base:%llx size:%llx\n",
> + dbgprintf("usable memory rgns size:%u base:%llx size:%llx\n",
>   usablemem_rgns.size, base, size);
> -#endif
>  }
>  
>  int is_crashkernel_mem_reserved(void)
> diff --git a/kexec/arch/ppc/fixup_dtb.c b/kexec/arch/ppc/fixup_dtb.c
> index 189e0c7..e5f2717 100644
> --- a/kexec/arch/ppc/fixup_dtb.c
> +++ b/kexec/arch/ppc/fixup_dtb.c
> @@ -17,25 +17,26 @@
>  
>  const char proc_dts[] = "/proc/device-tree";
>  
> -#ifdef DEBUG
>  static void print_fdt_reserve_regions(void)
>  {
>   int i, num;
>  
> + if (!kexec_debug)
> + return;
>   /* Print out a summary of the final reserve regions */
>   num =  fdt_num_mem_rsv(blob_buf);

blob_buf does not exist in the context of this function.
So clearly it hasn't been compiled or exercised for a while.
I propose removing it altogether. It can always be re-added latter
if someone fixes and tests it - I do not have access to any ppc hw to do so.

> - printf ("reserve regions: %d\n", num);
> + dbgprintf ("reserve regions: %d\n", num);
>   for (i = 0; i < num; i++) {
>   uint64_t offset, size;
>  
>   if (fdt_get_mem_rsv(blob_buf, i, &offset, &size) == 0) {
> - printf("%d: offset: %llx, size: %llx\n", i, offset, 
> size);
> + dbgprintf("%d: offset: %llx, size: %llx\n", i, offset, 
> size);
>   } else {
> - printf("Error retreiving reserved region\n");
> + dbgprintf("Error retreiving reserved region\n");
>   }
>   }
>  }
> -#endif
> +
>  
>  static void fixup_nodes(char *nodes[])
>  {
> @@ -203,9 +204,7 @@ static void fixup_reserve_regions(struct kexec_info 
> *info, char *blob_buf)
>  
>  out: ;
>  
> -#ifdef DEBUG
>   print_fdt_reserve_regions();
> -#endif
>  }
>  
>  static void fixup_memory(struct kexec_info *info, char *blob_buf)
> @@ -369,23 +368,23 @@ char *fixup_dtb_init(struct kexec_info *info, char 
> *blob_buf, off_t *blob_size,
>   return blob_buf;
>  }
>  
> -#ifdef DEBUG
>  static void save_fixed_up_dtb(char *blob_buf, off_t blob_size)
>  {
>   FILE *fp;
>  
> + if (!kexec_debug)
> + return;
>   fp = fopen("debug.dtb", "w");
>   if (fp) {
>   if ( blob_size == fwrite(blob_buf, sizeof(char), blob_size, 
> fp)) {
> - printf("debug.dtb written\n");
> + dbgprintf("debug.dtb written\n");
>   } else {
> - printf("Unable to write debug.dtb\n");
> + dbgprintf("Unable to write debug.dtb\n");
>   }
>   } else {
> - printf("Unable to dump