[lkml]   [2010]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] lib/atomic64_test: do not build on non-atomic64 systems
    On Fri, Oct 22, 2010 at 16:31, Andrew Morton wrote:
    > On Fri, 22 Oct 2010 16:14:49 -0400 Mike Frysinger wrote:
    >> On Thu, Oct 21, 2010 at 19:24, Andrew Morton wrote:
    >> > On Thu, 21 Oct 2010 19:04:36 -0400 Mike Frysinger wrote:
    >> >> you can say "lazy" all you like. __i dont see the point in going that route.
    >> >
    >> > Try
    >> >
    >> > __ __ __ __grep HAVE arch/x86/Kconfig
    >> >
    >> > If all of those were instead to use some random #define which the
    >> > particular feature happened to define in some header file then we would
    >> > have a mess on our hands.
    >> fun times.  new tact.
    >> Luca: your new atomic64_t test build fails on all arches that lack
    >> atomic64_t.  please fix.
    > That's only part of the problem.  The following won't build also:
    > net/rds

    not true. that code base is already using my suggestion:
    #ifdef ATOMIC64_INIT
    #define KERNEL_HAS_ATOMIC64

    but this isnt a matter of "use atomic64_t or atomic_t" ... this code
    manually takes care of doing a spinlock around a u64 member. i
    imagine if you'd notice this before it was merged you'd have made them
    fix this cleanly.

    > kernel/perf_event.c

    also not true -- this requires arches to opt in to HAVE_PERF_EVENTS
    and only arches which have validated it works (i.e. they have
    atomic64) have done that

    > drivers/staging/octeon

    not an issue -- this depends on CPU_CAVIUM_OCTEON which is only
    provided by mips which provides atomic64

    > drivers/infiniband/hw

    the only code usage of atomic64 is in code that already depends on the
    Kconfig symbol 64BIT

    as for why it depends on this, i dont know ... maybe it's because of atomic64_t

    > Or, much better, we implement atomic64 on the offending architectures.

    i dont want to give people the impression that 64 atomics are free to
    use if in reality they're pretty expensive. on a Blackfin system, i'd
    need to implement every access with basically a spinlock.

    > with more to come. These things should be made dependent upon
    > CONFIG_HAVE_ATOMIC64 in Kconfig. (Can't use #ifdef ATOMIC64_INIT for this!)

    these are actually compelling arguments unlike the original one. even
    if all these examples ended up not really being true (only the new
    atomic64_t test code is available to build on arches that lack
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2010-10-22 22:51    [W:0.026 / U:10.312 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site