02 Sep, 2010

1 commit

  • Add calls to of_node_put in the error handling code following calls to
    of_find_node_by_path and of_find_node_by_phandle.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r exists@
    local idexpression x;
    expression E,E1;
    statement S;
    @@

    *x =
    (of_find_node_by_path
    |of_find_node_by_name
    |of_find_node_by_phandle
    |of_get_parent
    |of_get_next_parent
    |of_get_next_child
    |of_find_compatible_node
    |of_match_node
    )(...);
    ...
    if (x == NULL) S
    ;
    |
    * return ...;
    )
    }
    ...>
    of_node_put(x);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Benjamin Herrenschmidt

    Julia Lawall
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

09 Feb, 2010

1 commit


17 Jun, 2009

1 commit

  • Callers of alloc_pages_node() can optionally specify -1 as a node to mean
    "allocate from the current node". However, a number of the callers in
    fast paths know for a fact their node is valid. To avoid a comparison and
    branch, this patch adds alloc_pages_exact_node() that only checks the nid
    with VM_BUG_ON(). Callers that know their node is valid are then
    converted.

    Signed-off-by: Mel Gorman
    Reviewed-by: Christoph Lameter
    Reviewed-by: KOSAKI Motohiro
    Reviewed-by: Pekka Enberg
    Acked-by: Paul Mundt [for the SLOB NUMA bits]
    Cc: Peter Zijlstra
    Cc: Nick Piggin
    Cc: Dave Hansen
    Cc: Lee Schermerhorn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     

15 May, 2009

1 commit

  • There have been a series of checkstops on QS21 related to
    ptcal being set up incorrectly. On systems that only
    have memory on a single node, ptcal fails when it gets
    a pointer to memory on the remote node.

    Moreover, agressive prefetching in memcpy and other
    functions may accidentally touch the first cache line
    of the page that we reserve for ptcal, which causes
    an ECC checkstop.

    We now allocate pages only from the specified node, moves the
    ptcal area into the middle of the allocated page to avoid
    potential prefetch problems and prints the address of the
    ptcal area to facilitate diagnostics.

    Signed-off-by: Gerhard Stenzel
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Benjamin Herrenschmidt

    Gerhard Stenzel
     

13 Jan, 2009

1 commit

  • Convert arch/powerpc/ over to long long based u64:

    -#ifdef __powerpc64__
    -# include
    -#else
    -# include
    -#endif
    +#include

    This will avoid reoccuring spurious warnings in core kernel code that
    comes when people test on their own hardware. (i.e. x86 in ~98% of the
    cases) This is what x86 uses and it generally helps keep 64-bit code
    32-bit clean too.

    [Adjusted to not impact user mode (from paulus) - sfr]

    Signed-off-by: Ingo Molnar
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Benjamin Herrenschmidt

    Ingo Molnar
     

05 Nov, 2008

1 commit

  • This fixes this error on Cell when CONFIG_KEXEC = n:

    arch/powerpc/platforms/cell/ras.c:299: error: implicit declaration of function 'crash_shutdown_register'

    We have to include because it contains the dummy
    definition of crash_shutdown_register that is used when
    CONFIG_KEXEC=n, but doesn't include in
    that case.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Paul Mackerras

    Alexey Dobriyan
     

31 Oct, 2008

1 commit

  • 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
    Signed-off-by: Paul Mackerras

    Milton Miller
     

22 Oct, 2008

1 commit

  • This adds relocatable kernel support for kdump. With this one can
    use the same regular kernel to capture the kdump. A signature (0xfeed1234)
    is passed in r6 from panic code to the next kernel through kexec_sequence
    and purgatory code. The signature is used to differentiate between
    kdump kernel and non-kdump kernels.

    The purgatory code compares the signature and sets the __kdump_flag in
    head_64.S. During the boot up, kernel code checks __kdump_flag and if it
    is set, the kernel will behave as relocatable kdump kernel. This kernel
    will boot at the address where it was loaded by kexec-tools ie. at the
    address reserved through crashkernel boot parameter.

    CONFIG_CRASH_DUMP depends on CONFIG_RELOCATABLE option to build kdump
    kernel as relocatable. So the same kernel can be used as production and
    kdump kernel.

    This patch incorporates the changes suggested by Paul Mackerras to avoid
    GOT use and to avoid two copies of the code.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Mohan Kumar M
    Signed-off-by: Michael Ellerman
    Signed-off-by: Benjamin Herrenschmidt

    Mohan Kumar M
     

22 Jul, 2008

1 commit


30 Jun, 2008

1 commit


01 Apr, 2008

1 commit


14 Feb, 2008

1 commit


09 Oct, 2007

1 commit


30 Apr, 2007

1 commit


24 Apr, 2007

1 commit

  • Enable Periodic Recalibration (PTCAL) support for Cell XDR memory,
    using the new ibm,cbe-start-ptcal and ibm,cbe-stop-ptcal RTAS calls.

    Tested on QS20 and QS21 (by Thomas Huth). It seems that SLOF has
    problems disabling, at least on QS20; this patch should only be
    used once these problems have been addressed.

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Arnd Bergmann

    Jeremy Kerr
     

04 Oct, 2006

1 commit


21 Jun, 2006

1 commit

  • This is a first version of support for the Cell BE "Reliability,
    Availability and Serviceability" features.

    It doesn't yet handle some of the RAS interrupts (the ones described in
    iic_is/iic_irr), I'm still working on a proper way to expose these. They
    are essentially a cascaded controller by themselves (sic !) though I may
    just handle them locally to the iic driver. I need also to sync with
    David Erb on the way he hooked in the performance monitor interrupt.

    So that's all for 2.6.17 and I'll do more work on that with my rework of
    the powerpc interrupt layer that I'm hacking on at the moment.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt