lkml.org 
[lkml]   [2011]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subjectlinux-next: build failure after merge of the final tree
    Hi all,

    After merging the final tree, today's linux-next build (sparc32 defconfig)
    failed like this:

    In file included from include/linux/seqlock.h:29,
    from include/linux/time.h:8,
    from include/linux/timex.h:56,
    from include/linux/sched.h:57,
    from arch/sparc/kernel/asm-offsets.c:13:
    include/linux/spinlock.h: In function 'spin_unlock_wait':
    include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax'

    Probably the victim of some include changing ... I think it was due to
    commit e66eed651fd1 ("list: remove prefetching from regular list
    iterators").

    I added the following patch for today (this may not be the best solution):

    From: Stephen Rothwell <sfr@canb.auug.org.au>
    Date: Fri, 20 May 2011 15:48:17 +1000
    Subject: [PATCH] spinlock_up.h: include asm/processor.h in for cpu_relax

    Commit e66eed651fd1 ("list: remove prefetching from regular list
    iterators") removed the include of prefetch.h from list.h and this was
    a path to including asm/processor.h. We need to include it excplicitly
    now.

    Fixes this build error on sparc32 (at least):

    In file included from include/linux/seqlock.h:29,
    from include/linux/time.h:8,
    from include/linux/timex.h:56,
    from include/linux/sched.h:57,
    from arch/sparc/kernel/asm-offsets.c:13:
    include/linux/spinlock.h: In function 'spin_unlock_wait':
    include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax

    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    ---
    include/linux/spinlock_up.h | 2 ++
    1 files changed, 2 insertions(+), 0 deletions(-)
    diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h
    index b14f6a9..a26e2fb 100644
    --- a/include/linux/spinlock_up.h
    +++ b/include/linux/spinlock_up.h
    @@ -5,6 +5,8 @@
    # error "please don't include this file directly"
    #endif

    +#include <asm/processor.h> /* for cpu_relax() */
    +
    /*
    * include/linux/spinlock_up.h - UP-debug version of spinlocks.
    *
    --
    1.7.5.1
    --
    Cheers,
    Stephen Rothwell sfr@canb.auug.org.au
    http://www.canb.auug.org.au/~sfr/


    \
     
     \ /
      Last update: 2011-05-20 08:15    [from the cache]
    ©2003-2011 Jasper Spaans