13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

23 Oct, 2008

1 commit


20 Oct, 2008

2 commits

  • The usage of elfcorehdr_addr has changed recently such that being set to
    ELFCORE_ADDR_MAX is used by is_kdump_kernel() to indicate if the code is
    executing in a kernel executed as a crash kernel.

    However, arch/ia64/kernel/setup.c:reserve_elfcorehdr will rest
    elfcorehdr_addr to ELFCORE_ADDR_MAX on error, which means any subsequent
    calls to is_kdump_kernel() will return 0, even though they should return
    1.

    Ok, at this point in time there are no subsequent calls, but I think its
    fair to say that there is ample scope for error or at the very least
    confusion.

    This patch add an extra state, ELFCORE_ADDR_ERR, which indicates that
    elfcorehdr_addr was passed on the command line, and thus execution is
    taking place in a crashdump kernel, but vmcore can't be used for some
    reason. This is tested for using is_vmcore_usable() and set using
    vmcore_unusable(). A subsequent patch makes use of this new code.

    To summarise, the states that elfcorehdr_addr can now be in are as follows:

    ELFCORE_ADDR_MAX: not a crashdump kernel
    ELFCORE_ADDR_ERR: crashdump kernel but vmcore is unusable
    any other value: crash dump kernel and vmcore is usable

    Signed-off-by: Simon Horman
    Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Simon Horman
     
  • o elfcorehdr_addr is used by not only the code under CONFIG_PROC_VMCORE
    but also by the code which is not inside CONFIG_PROC_VMCORE. For
    example, is_kdump_kernel() is used by powerpc code to determine if
    kernel is booting after a panic then use previous kernel's TCE table.
    So even if CONFIG_PROC_VMCORE is not set in second kernel, one should be
    able to correctly determine that we are booting after a panic and setup
    calgary iommu accordingly.

    o So remove the assumption that elfcorehdr_addr is under
    CONFIG_PROC_VMCORE.

    o Move definition of elfcorehdr_addr to arch dependent crash files.
    (Unfortunately crash dump does not have an arch independent file
    otherwise that would have been the best place).

    o kexec.c is not the right place as one can Have CRASH_DUMP enabled in
    second kernel without KEXEC being enabled.

    o I don't see sh setup code parsing the command line for
    elfcorehdr_addr. I am wondering how does vmcore interface work on sh.
    Anyway, I am atleast defining elfcoredhr_addr so that compilation is not
    broken on sh.

    Signed-off-by: Vivek Goyal
    Acked-by: "Eric W. Biederman"
    Acked-by: Simon Horman
    Acked-by: Paul Mundt
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     

26 Jul, 2008

2 commits

  • fix build bug introduced by 95b68dec0d5 "calgary iommu: use the first
    kernels TCE tables in kdump":

    arch/x86/kernel/built-in.o: In function `calgary_iommu_init':
    (.init.text+0x8399): undefined reference to `elfcorehdr_addr'
    arch/x86/kernel/built-in.o: In function `calgary_iommu_init':
    (.init.text+0x856c): undefined reference to `elfcorehdr_addr'
    arch/x86/kernel/built-in.o: In function `detect_calgary':
    (.init.text+0x8c68): undefined reference to `elfcorehdr_addr'
    arch/x86/kernel/built-in.o: In function `detect_calgary':
    (.init.text+0x8d0c): undefined reference to `elfcorehdr_addr'

    make elfcorehdr_addr a generally available symbol.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • kdump kernel fails to boot with calgary iommu and aacraid driver on a x366
    box. The ongoing dma's of aacraid from the first kernel continue to exist
    until the driver is loaded in the kdump kernel. Calgary is initialized
    prior to aacraid and creation of new tce tables causes wrong dma's to
    occur. Here we try to get the tce tables of the first kernel in kdump
    kernel and use them. While in the kdump kernel we do not allocate new tce
    tables but instead read the base address register contents of calgary
    iommu and use the tables that the registers point to. With these changes
    the kdump kernel and hence aacraid now boots normally.

    Signed-off-by: Chandru Siddalingappa
    Acked-by: Muli Ben-Yehuda
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandru
     

03 May, 2007

1 commit

  • The specific case I am encountering is kdump under Xen with a 64 bit
    hypervisor and 32 bit kernel/userspace. The dump created is 64 bit due to
    the hypervisor but the dump kernel is 32 bit for maximum compatibility.

    It's possibly less likely to be useful in a purely native scenario but I
    see no reason to disallow it.

    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Ian Campbell
    Signed-off-by: Andi Kleen
    Acked-by: Vivek Goyal
    Cc: Horms
    Cc: Magnus Damm
    Cc: "Eric W. Biederman"
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton

    Ian Campbell
     

29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

26 Jun, 2005

3 commits

  • From: "Vivek Goyal"

    o Support for /proc/vmcore interface. This interface exports elf core image
    either in ELF32 or ELF64 format, depending on the format in which elf headers
    have been stored by crashed kernel.
    o Added support for CONFIG_VMCORE config option.
    o Removed the dependency on /proc/kcore.

    From: "Eric W. Biederman"

    This patch has been refactored to more closely match the prevailing style in
    the affected files. And to clearly indicate the dependency between
    /proc/kcore and proc/vmcore.c

    From: Hariprasad Nellitheertha

    This patch contains the code that provides an ELF format interface to the
    previous kernel's memory post kexec reboot.

    Signed off by Hariprasad Nellitheertha
    Signed-off-by: Eric Biederman
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • This patch adds support for retrieving the address of elf core header if one
    is passed in command line.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • This patch provides the interfaces necessary to read the dump contents,
    treating it as a high memory device.

    Signed off by Hariprasad Nellitheertha
    Signed-off-by: Eric Biederman
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal