x86 arch updates also broke s390 - Kernel

This is a discussion on x86 arch updates also broke s390 - Kernel ; .... CC arch/s390/kernel/asm-offsets.s In file included from /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/s390/kernel/asm-offsets.c:7: /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h: In function 'spin_needbreak': /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h:1931: error: implicit declaration of function '__raw_spin_is_contended' make[2]: *** [arch/s390/kernel/asm-offsets.s] Error 1 Guilty commit: Commit: 95c354fe9f7d6decc08a92aa26eb233ecc2155bf Author: Nick Piggin Wed, 30 Jan 2008 13:31:20 +0100 spinlock: lockbreak cleanup ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: x86 arch updates also broke s390

  1. x86 arch updates also broke s390

    <-- snip -->

    ....
    CC arch/s390/kernel/asm-offsets.s
    In file included from
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/s390/kernel/asm-offsets.c:7:
    /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h: In function 'spin_needbreak':
    /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h:1931: error: implicit declaration of function '__raw_spin_is_contended'
    make[2]: *** [arch/s390/kernel/asm-offsets.s] Error 1

    <-- snip -->


    Guilty commit:

    Commit: 95c354fe9f7d6decc08a92aa26eb233ecc2155bf
    Author: Nick Piggin Wed, 30 Jan 2008 13:31:20 +0100

    spinlock: lockbreak cleanup

    The break_lock data structure and code for spinlocks is quite nasty.
    Not only does it double the size of a spinlock but it changes locking to
    a potentially less optimal trylock.

    Put all of that under CONFIG_GENERIC_LOCKBREAK, and introduce a
    __raw_spin_is_contended that uses the lock data itself to determine whether
    there are waiters on the lock, to be used if CONFIG_GENERIC_LOCKBREAK is
    not set.

    Rename need_lockbreak to spin_needbreak, make it use spin_is_contended to
    decouple it from the spinlock implementation, and make it typesafe (rwlocks
    do not have any need_lockbreak sites -- why do they even get bloated up
    with that break_lock then?).

    Signed-off-by: Nick Piggin
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner




    cu
    Adrian

    --

    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: x86 arch updates also broke s390

    On Thu, 2008-01-31 at 02:33 +0200, Adrian Bunk wrote:
    > <-- snip -->
    >
    > ...
    > CC arch/s390/kernel/asm-offsets.s
    > In file included from
    > /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/s390/kernel/asm-offsets.c:7:
    > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h: In
    > function 'spin_needbreak':
    > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h:1931:
    > error: implicit declaration of function '__raw_spin_is_contended'
    > make[2]: *** [arch/s390/kernel/asm-offsets.s] Error 1
    >
    > <-- snip -->


    Defining GENERIC_LOCKBREAK in arch/s390/Kconfig takes care of it. I'll
    cook up a patch and queue it in git390.

    --
    blue skies,
    Martin.

    "Reality continues to ruin my life." - Calvin.


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: x86 arch updates also broke s390


    * Martin Schwidefsky wrote:

    > On Thu, 2008-01-31 at 02:33 +0200, Adrian Bunk wrote:
    > > <-- snip -->
    > >
    > > ...
    > > CC arch/s390/kernel/asm-offsets.s
    > > In file included from
    > > /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/s390/kernel/asm-offsets.c:7:
    > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h: In
    > > function 'spin_needbreak':
    > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h:1931:
    > > error: implicit declaration of function '__raw_spin_is_contended'
    > > make[2]: *** [arch/s390/kernel/asm-offsets.s] Error 1
    > >
    > > <-- snip -->

    >
    > Defining GENERIC_LOCKBREAK in arch/s390/Kconfig takes care of it. I'll
    > cook up a patch and queue it in git390.


    thanks!

    Ingo
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: x86 arch updates also broke s390

    On Thu, Jan 31, 2008 at 11:24:54AM +0100, Ingo Molnar wrote:
    >
    > * Martin Schwidefsky wrote:
    >
    > > On Thu, 2008-01-31 at 02:33 +0200, Adrian Bunk wrote:
    > > > <-- snip -->
    > > >
    > > > ...
    > > > CC arch/s390/kernel/asm-offsets.s
    > > > In file included from
    > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/s390/kernel/asm-offsets.c:7:
    > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h: In
    > > > function 'spin_needbreak':
    > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/sched.h:1931:
    > > > error: implicit declaration of function '__raw_spin_is_contended'
    > > > make[2]: *** [arch/s390/kernel/asm-offsets.s] Error 1
    > > >
    > > > <-- snip -->

    > >
    > > Defining GENERIC_LOCKBREAK in arch/s390/Kconfig takes care of it. I'll
    > > cook up a patch and queue it in git390.

    >
    > thanks!


    Yeah thanks, don't know what happened with this, sorry. I thought I
    had defined it for all SMP capable ones, so maybe it was a quilt
    error or something on my part.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: x86 arch updates also broke s390


    * Martin Schwidefsky wrote:

    > Defining GENERIC_LOCKBREAK in arch/s390/Kconfig takes care of it. I'll
    > cook up a patch and queue it in git390.


    the one below should do the trick.

    Ingo

    ----------------->
    Subject: s390: enable GENERIC_LOCKBREAK
    From: Ingo Molnar

    the recent need_lockbreak cleanups broke s390 build: enable
    GENERIC_LOCKBREAK.

    Signed-off-by: Ingo Molnar
    ---
    arch/s390/Kconfig | 3 +++
    1 file changed, 3 insertions(+)

    Index: linux/arch/s390/Kconfig
    ================================================== =================
    --- linux.orig/arch/s390/Kconfig
    +++ linux/arch/s390/Kconfig
    @@ -22,6 +22,9 @@ config RWSEM_GENERIC_SPINLOCK
    config RWSEM_XCHGADD_ALGORITHM
    def_bool y

    +config GENERIC_LOCKBREAK
    + def_bool y
    +
    config ARCH_HAS_ILOG2_U32
    bool
    default n
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: x86 arch updates also broke s390


    * Martin Schwidefsky wrote:

    > On Fri, 2008-02-01 at 10:48 +0100, Ingo Molnar wrote:
    > > > Defining GENERIC_LOCKBREAK in arch/s390/Kconfig takes care of it.

    > > I'll
    > > > cook up a patch and queue it in git390.

    > >
    > > the one below should do the trick.

    >
    > Thanks but I already queued a different one (see below). The other
    > architectures that define GENERIC_LOCKBREAK have the "depends on SMP
    > && PREEMPT" line as well. The line does make sense if you look at the
    > way how spin_is_contended is used, no ?


    yes, you are right and your fix is the correct one. Currently, if we
    define GENERIC_LOCKBREAK on UP then we get accesses to the non-existing
    lock->need_lockbreak field.

    [ btw., this is really a small uncleanliness in the generic code: it
    should be possible for an architecture to just enable
    GENERIC_LOCKBREAK unconditionally, to indicate that it intends to "let
    the generic code do this". Then the generic code, when it does not
    have a field (such as on UP), should just not access it. But this is a
    small detail. ]

    Ingo
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. Re: x86 arch updates also broke s390


    * Ingo Molnar wrote:

    > > Defining GENERIC_LOCKBREAK in arch/s390/Kconfig takes care of it.
    > > I'll cook up a patch and queue it in git390.

    >
    > the one below should do the trick.


    ah, i see the one you queued up (below) is even better

    Ingo

    ------------->
    Subject: [PATCH] Define GENERIC_LOCKBREAK.

    From: Martin Schwidefsky

    Fix compile error:

    CC arch/s390/kernel/asm-offsets.s
    In file included from
    arch/s390/kernel/asm-offsets.c:7:
    include/linux/sched.h: In function 'spin_needbreak':
    include/linux/sched.h:1931: error: implicit declaration of function '__raw_spin_is_contended'
    make[2]: *** [arch/s390/kernel/asm-offsets.s] Error 1

    Signed-off-by: Martin Schwidefsky
    ---

    arch/s390/Kconfig | 5 +++++
    1 file changed, 5 insertions(+)

    diff -urpN linux-2.6/arch/s390/Kconfig linux-2.6-patched/arch/s390/Kconfig
    --- linux-2.6/arch/s390/Kconfig 2008-01-31 13:57:33.000000000 +0100
    +++ linux-2.6-patched/arch/s390/Kconfig 2008-01-31 13:57:42.000000000 +0100
    @@ -47,6 +47,11 @@ config NO_IOMEM
    config NO_DMA
    def_bool y

    +config GENERIC_LOCKBREAK
    + bool
    + default y
    + depends on SMP && PREEMPT
    +
    mainmenu "Linux Kernel Configuration"

    config S390
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: x86 arch updates also broke s390

    On Fri, 2008-02-01 at 10:48 +0100, Ingo Molnar wrote:
    > > Defining GENERIC_LOCKBREAK in arch/s390/Kconfig takes care of it.

    > I'll
    > > cook up a patch and queue it in git390.

    >
    > the one below should do the trick.


    Thanks but I already queued a different one (see below). The other
    architectures that define GENERIC_LOCKBREAK have the "depends on SMP &&
    PREEMPT" line as well. The line does make sense if you look at the way
    how spin_is_contended is used, no ?

    --
    blue skies,
    Martin.

    "Reality continues to ruin my life." - Calvin.

    ---
    Subject: [PATCH] Define GENERIC_LOCKBREAK.

    From: Martin Schwidefsky

    Fix compile error:

    CC arch/s390/kernel/asm-offsets.s
    In file included from
    arch/s390/kernel/asm-offsets.c:7:
    include/linux/sched.h: In function 'spin_needbreak':
    include/linux/sched.h:1931: error: implicit declaration of function
    '__raw_spin_is_contended'
    make[2]: *** [arch/s390/kernel/asm-offsets.s] Error 1

    Signed-off-by: Martin Schwidefsky
    ---

    arch/s390/Kconfig | 5 +++++
    1 file changed, 5 insertions(+)

    diff -urpN linux-2.6/arch/s390/Kconfig
    linux-2.6-patched/arch/s390/Kconfig
    --- linux-2.6/arch/s390/Kconfig 2008-01-31 13:57:33.000000000 +0100
    +++ linux-2.6-patched/arch/s390/Kconfig 2008-01-31 13:57:42.000000000
    +0100
    @@ -47,6 +47,11 @@ config NO_IOMEM
    config NO_DMA
    def_bool y

    +config GENERIC_LOCKBREAK
    + bool
    + default y
    + depends on SMP && PREEMPT
    +
    mainmenu "Linux Kernel Configuration"

    config S390


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread