]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Use is_kdump_kernel()
authorMilton Miller <miltonm@bga.com>
Wed, 22 Oct 2008 20:39:04 +0000 (15:39 -0500)
committerPaul Mackerras <paulus@samba.org>
Fri, 31 Oct 2008 05:11:47 +0000 (16:11 +1100)
linux/crash_dump.h defines is_kdump_kernel() to be used by code that
needs to know if the previous kernel crashed instead of a (clean) boot
or reboot.

This updates the just added powerpc code to use it.  This is needed
for the next commit, which will remove __kdump_flag.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/include/asm/kdump.h
arch/powerpc/kernel/iommu.c
arch/powerpc/platforms/cell/ras.c
arch/powerpc/platforms/pseries/iommu.c

index 821ed48c10edbb8d85480799bcf4f572bfc8ae88..b07ebb9784d365b61d4216969fe24fa5c697e269 100644 (file)
@@ -20,8 +20,6 @@
 
 #ifndef __ASSEMBLY__
 
-extern unsigned long __kdump_flag;
-
 #if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_RELOCATABLE)
 extern void reserve_kdump_trampoline(void);
 extern void setup_kdump_trampoline(void);
index 3857d7e2af0cab9513c72262f2e6372c66bf31c9..45f47c97fd1400363c6d1b0b6552d2bb6da934ba 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/bitops.h>
 #include <linux/iommu-helper.h>
+#include <linux/crash_dump.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/iommu.h>
@@ -460,7 +461,7 @@ void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
 
 static void iommu_table_clear(struct iommu_table *tbl)
 {
-       if (!__kdump_flag) {
+       if (!is_kdump_kernel()) {
                /* Clear the table in case firmware left allocations in it */
                ppc_md.tce_free(tbl, tbl->it_offset, tbl->it_size);
                return;
index 665af1c4195b87ececd6b0b309eafa6242767be1..fdf088f2430e8ad4feb9d03dee0e16366e7d8fbc 100644 (file)
 #include <linux/kernel.h>
 #include <linux/smp.h>
 #include <linux/reboot.h>
+#include <linux/kexec.h>
+#include <linux/crash_dump.h>
 
 #include <asm/reg.h>
 #include <asm/io.h>
 #include <asm/prom.h>
-#include <asm/kexec.h>
 #include <asm/machdep.h>
 #include <asm/rtas.h>
 #include <asm/cell-regs.h>
-#include <asm/kdump.h>
 
 #include "ras.h"
 
@@ -112,7 +112,7 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order)
        int ret = -ENOMEM;
        unsigned long addr;
 
-       if (__kdump_flag)
+       if (is_kdump_kernel())
                rtas_call(ptcal_stop_tok, 1, 1, NULL, nid);
 
        area = kmalloc(sizeof(*area), GFP_KERNEL);
index d56491d182d399e1f3fd2aa58bb98fe3a99609e4..c90817acb4729386c2634c54bd0d14efc83ec086 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/string.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
+#include <linux/crash_dump.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/rtas.h>
@@ -44,7 +45,6 @@
 #include <asm/tce.h>
 #include <asm/ppc-pci.h>
 #include <asm/udbg.h>
-#include <asm/kdump.h>
 
 #include "plpar_wrappers.h"
 
@@ -292,7 +292,7 @@ static void iommu_table_setparms(struct pci_controller *phb,
 
        tbl->it_base = (unsigned long)__va(*basep);
 
-       if (!__kdump_flag)
+       if (!is_kdump_kernel())
                memset((void *)tbl->it_base, 0, *sizep);
 
        tbl->it_busno = phb->bus->number;