01 Aug, 2007

1 commit

  • Alexey Dobriyan noticed that the new WARN_ON() semantics that were
    introduced by commit 684f978347deb42d180373ac4c427f82ef963171 (to also
    return the value to be warned on) didn't compile when given a bitfield,
    because the typeof doesn't work for bitfields.

    So instead of the typeof trick, use an "int" variable together with a
    "!!(x)" expression, as suggested by Al Viro.

    To make matters more interesting, Paul Mackerras points out that that is
    sub-optimal on Power, but the old asm-coded comparison seems to be buggy
    anyway on 32-bit Power if the conditional was 64-bit, so I think there
    are more problems there.

    Regardless, the new WARN_ON() semantics may have been a bad idea. But
    this at least avoids the more serious complications.

    Cc: Alexey Dobriyan
    Cc: Herbert Xu
    Cc: Paul Mackerras
    Cc: Al Viro
    Cc: Ingo Molnar
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

27 Jul, 2007

1 commit


09 Jan, 2007

1 commit

  • When we switched over to the generic BUG mechanism we forgot to change
    the assembly code which open-codes a WARN_ON() in enter_rtas(), so the
    bug table got corrupted.

    This patch provides an EMIT_BUG_ENTRY macro for use in assembly code,
    and uses it in entry_64.S. Tested with CONFIG_DEBUG_BUGVERBOSE on ppc64
    but not without -- I tried to turn it off but it wouldn't go away; I
    suspect Aunt Tillie probably needed it.

    This version gets __FILE__ and __LINE__ right in the assembly version --
    rather than saying include/asm-powerpc/bug.h line 21 every time which is
    a little suboptimal.

    Signed-off-by: David Woodhouse
    Signed-off-by: Paul Mackerras

    David Woodhouse
     

11 Dec, 2006

1 commit

  • This makes powerpc use the generic BUG machinery. The biggest reports the
    function name, since it is redundant with kallsyms, and not needed in general.

    There is an overall reduction of code, since module_32/64 duplicated several
    functions.

    Unfortunately there's no way to tell gcc that BUG won't return, so the BUG
    macro includes a goto loop. This will generate a real jmp instruction, which
    is never used.

    [akpm@osdl.org: build fix]
    [paulus@samba.org: remove infinite loop in BUG_ON]
    Signed-off-by: Jeremy Fitzhardinge
    Cc: Andi Kleen
    Cc: Hugh Dickens
    Cc: Michael Ellerman
    Cc: Benjamin Herrenschmidt
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Jeremy Fitzhardinge
     

30 Sep, 2006

1 commit

  • Letting WARN_ON/WARN_ON_ONCE return the condition means that you could do

    if (WARN_ON(blah)) {
    handle_impossible_case
    }

    Rather than

    if (unlikely(blah)) {
    WARN_ON(1)
    handle_impossible_case
    }

    I checked all the newly added WARN_ON_ONCE users and none of them test the
    return status so we can still change it.

    [akpm@osdl.org: warning fix]
    [akpm@osdl.org: build fix]
    Signed-off-by: Herbert Xu
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Herbert Xu
     

28 Mar, 2006

1 commit


27 Mar, 2006

1 commit


09 Jan, 2006

1 commit

  • include/asm-ppc/ had #ifdef __KERNEL__ in all header files that
    are not meant for use by user space, include/asm-powerpc does
    not have this yet.

    This patch gets us a lot closer there. There are a few cases
    where I was not sure, so I left them out. I have verified
    that no CONFIG_* symbols are used outside of __KERNEL__
    any more and that there are no obvious compile errors when
    including any of the headers in user space libraries.

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

    Arnd Bergmann
     

10 Nov, 2005

1 commit

  • This patch consolidates macros used to generate assembly for
    compatibility across different CPUs or configs. A new header,
    asm-powerpc/asm-compat.h contains the main compatibility macros. It
    uses some preprocessor magic to make the macros suitable both for use
    in .S files, and in inline asm in .c files. Headers (bitops.h,
    uaccess.h, atomic.h, bug.h) which had their own such compatibility
    macros are changed to use asm-compat.h.

    ppc_asm.h is now for use in .S files *only*, and a #error enforces
    that. As such, we're a lot more careless about namespace pollution
    here than in asm-compat.h.

    While we're at it, this patch adds a call to the PPC405_ERR77 macro in
    futex.h which should have had it already, but didn't.

    Built and booted on pSeries, Maple and iSeries (ARCH=powerpc). Built
    for 32-bit powermac (ARCH=powerpc) and Walnut (ARCH=ppc).

    Signed-off-by: David Gibson
    Signed-off-by: Paul Mackerras

    David Gibson
     

02 Nov, 2005

2 commits


01 Nov, 2005

1 commit

  • The bug_entry struct had an int in the middle of pointers and unsigned
    longs, and the inline asm that generated the bug table entries didn't
    insert the necessary padding, so the fields following it didn't get
    initialized properly and an oops resulted. This changes the int field
    (the line number) to a long so that all the fields are the same size
    and no padding is required.

    Signed-off-by: Paul Mackerras

    Paul Mackerras
     

21 Sep, 2005

1 commit

  • ppc32/ppc64: Merge bug.h into include/asm-powerpc

    This patch merges bug.h into include/asm-powerpc. Changed the data
    structure for bug_entry such that line is always an int on both 32 and
    64-bit platforms; removed casts to int from the 64-bit trap code to
    reflect this.

    Signed-off-by: Kumar Gala
    Signed-off-by: Becky Bruce
    Signed-off-by: Paul Mackerras

    Becky Bruce