Re: [ORLinux] [PATCH 17/35] Make asm-generic/cmpxchg.h #includeasm-generic/cmpxchg-local.h [ver #2]

From: Jonas Bonn
Date: Wed Mar 14 2012 - 10:43:08 EST



On Wed, 2012-03-14 at 11:10 +0000, David Howells wrote:
> Jonas Bonn <jonas.bonn@xxxxxxxxx> wrote:
>
> > --- a/include/asm-generic/bitops/atomic.h
> > +++ b/include/asm-generic/bitops/atomic.h
> > @@ -2,7 +2,6 @@
> > #define _ASM_GENERIC_BITOPS_ATOMIC_H_
> >
> > #include <asm/types.h>
> > -#include <asm/system.h>
> >
> > #ifdef CONFIG_SMP
> > #include <asm/spinlock.h>
>
> That's actually done in patch 33. I wouldn't want to remove that if I can
> avoid it until after all the arches have been altered.

OK, fair enough.

Am I right in thinking that OpenRISC is the only architecture the
depends on the changes in asm-generic? If yes, I could take this series
and hold off on the pull request until after the rest of your changes go
in. Either way, it seems that OpenRISC will break for a bit...

The error I get while building (if asm/system.h is included) is a
circular dependency that I don't see that I can easily resolve:

CC arch/openrisc/kernel/asm-offsets.s
In file included from include/asm-generic/switch_to.h:17:0,
from arch/openrisc/include/generated/asm/switch_to.h:1,

from /home/jonas/openrisc/linux/arch/openrisc/include/asm/system.h:5,
from include/asm-generic/bitops/atomic.h:5,

from /home/jonas/openrisc/linux/arch/openrisc/include/asm/bitops.h:55,
from include/linux/bitops.h:22,
from include/linux/signal.h:38,
from arch/openrisc/kernel/asm-offsets.c:26:
include/linux/thread_info.h: In function âset_ti_thread_flagâ:
include/linux/thread_info.h:64:2: error: implicit declaration of
function âset_bitâ
include/linux/thread_info.h: In function âclear_ti_thread_flagâ:
include/linux/thread_info.h:69:2: error: implicit declaration of
function âclear_bitâ
include/linux/thread_info.h: In function âtest_and_set_ti_thread_flagâ:
include/linux/thread_info.h:74:2: error: implicit declaration of
function âtest_and_set_bitâ
include/linux/thread_info.h: In function
âtest_and_clear_ti_thread_flagâ:
include/linux/thread_info.h:79:2: error: implicit declaration of
function âtest_and_clear_bitâ
include/linux/thread_info.h: In function âtest_ti_thread_flagâ:
include/linux/thread_info.h:84:2: error: implicit declaration of
function âtest_bitâ
In file included
from /home/jonas/openrisc/linux/arch/openrisc/include/asm/bitops.h:55:0,
from include/linux/bitops.h:22,
from include/linux/signal.h:38,
from arch/openrisc/kernel/asm-offsets.c:26:
include/asm-generic/bitops/atomic.h: At top level:
include/asm-generic/bitops/atomic.h:65:20: warning: conflicting types
for âset_bitâ
include/asm-generic/bitops/atomic.h:65:20: error: static declaration of
âset_bitâ follows non-static declaration
include/linux/thread_info.h:64:2: note: previous implicit declaration of
âset_bitâ was here
include/asm-generic/bitops/atomic.h:86:20: warning: conflicting types
for âclear_bitâ
include/asm-generic/bitops/atomic.h:86:20: error: static declaration of
âclear_bitâ follows non-static declaration
include/linux/thread_info.h:69:2: note: previous implicit declaration of
âclear_bitâ was here
include/asm-generic/bitops/atomic.h:127:19: error: static declaration of
âtest_and_set_bitâ follows non-static declaration
include/linux/thread_info.h:74:9: note: previous implicit declaration of
âtest_and_set_bitâ was here
include/asm-generic/bitops/atomic.h:151:19: error: static declaration of
âtest_and_clear_bitâ follows non-static declaration
include/linux/thread_info.h:79:9: note: previous implicit declaration of
âtest_and_clear_bitâ was here
In file included
from /home/jonas/openrisc/linux/arch/openrisc/include/asm/bitops.h:56:0,
from include/linux/bitops.h:22,
from include/linux/signal.h:38,
from arch/openrisc/kernel/asm-offsets.c:26:
include/asm-generic/bitops/non-atomic.h:103:19: error: static
declaration of âtest_bitâ follows non-static declaration
include/linux/thread_info.h:84:9: note: previous implicit declaration of
âtest_bitâ was here
make[1]: *** [arch/openrisc/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

/Jonas

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