* Add #includes needed to permit the removal of asm/system.h - sha1 96f951edb1f1bdbbc99b0cd458f9808bb83d58ae
@ 2013-01-03 12:32 Michal Simek
2013-01-03 16:35 ` David Howells
0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2013-01-03 12:32 UTC (permalink / raw)
To: dhowells, linux-next, LKML, Arnd Bergmann
HI David and Arnd,
This patch is breaking microblaze kernel compilation
commit 96f951edb1f1bdbbc99b0cd458f9808bb83d58ae
Author: David Howells <dhowells@redhat•com>
Date: Wed Mar 28 18:30:03 2012 +0100
Add #includes needed to permit the removal of asm/system.h
Warning log:
CC kernel/irq_work.o
In file included from include/linux/irq_work.h:4,
from kernel/irq_work.c:11:
include/linux/llist.h: In function 'llist_add':
include/linux/llist.h:185: error: implicit declaration of function
'cmpxchg_local'
include/linux/llist.h:185: warning: assignment makes pointer from
integer without a cast
make[1]: *** [kernel/irq_work.o] Error 1
make: *** [kernel] Error 2
make: *** Waiting for unfinished jobs....
It is because microblaze uses cmpxchg_local which is defined
asm-generic/atomic.h file.
Arnds patch has added it to atomic.h
asm-generic: add generic atomic.h and io.h
(sha1: 3f7e212df82ca0459d44c91d9e019efd1b5f936c)
What about to move cmpxchg_local and cmpxchg64_local from atomic.h to
cmpxchg-local.h?
If this should be separate step after your patch then please squash
the patch below to your one.
Thanks,
Michal
diff --git a/arch/microblaze/include/asm/cmpxchg.h
b/arch/microblaze/include/asm/cmpxchg.h
index 538afc0..cd10925 100644
--- a/arch/microblaze/include/asm/cmpxchg.h
+++ b/arch/microblaze/include/asm/cmpxchg.h
@@ -38,5 +38,6 @@ static inline unsigned long __xchg(unsigned long x,
volatile void *ptr,
#include <asm-generic/cmpxchg.h>
#include <asm-generic/cmpxchg-local.h>
+#include <asm-generic/atomic.h>
#endif /* _ASM_MICROBLAZE_CMPXCHG_H */
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: Add #includes needed to permit the removal of asm/system.h - sha1 96f951edb1f1bdbbc99b0cd458f9808bb83d58ae
2013-01-03 12:32 Add #includes needed to permit the removal of asm/system.h - sha1 96f951edb1f1bdbbc99b0cd458f9808bb83d58ae Michal Simek
@ 2013-01-03 16:35 ` David Howells
2013-01-04 11:41 ` Michal Simek
0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2013-01-03 16:35 UTC (permalink / raw)
To: Michal Simek; +Cc: dhowells, linux-next, LKML, Arnd Bergmann
Michal Simek <monstr@monstr•eu> wrote:
> It is because microblaze uses cmpxchg_local which is defined
> asm-generic/atomic.h file.
> Arnds patch has added it to atomic.h
> asm-generic: add generic atomic.h and io.h
> (sha1: 3f7e212df82ca0459d44c91d9e019efd1b5f936c)
>
> What about to move cmpxchg_local and cmpxchg64_local from atomic.h to
> cmpxchg-local.h?
Hmmm... cmpxchg_local() should be obtained through asm/cmpxchg.h, not
asm/atomic.h. See:
grep -r define\\s*cmpxchg_local arch
David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Add #includes needed to permit the removal of asm/system.h - sha1 96f951edb1f1bdbbc99b0cd458f9808bb83d58ae
2013-01-03 16:35 ` David Howells
@ 2013-01-04 11:41 ` Michal Simek
0 siblings, 0 replies; 3+ messages in thread
From: Michal Simek @ 2013-01-04 11:41 UTC (permalink / raw)
To: David Howells; +Cc: linux-next, LKML, Arnd Bergmann, linux-arch
2013/1/3 David Howells <dhowells@redhat•com>:
> Michal Simek <monstr@monstr•eu> wrote:
>
>> It is because microblaze uses cmpxchg_local which is defined
>> asm-generic/atomic.h file.
>> Arnds patch has added it to atomic.h
>> asm-generic: add generic atomic.h and io.h
>> (sha1: 3f7e212df82ca0459d44c91d9e019efd1b5f936c)
>>
>> What about to move cmpxchg_local and cmpxchg64_local from atomic.h to
>> cmpxchg-local.h?
>
> Hmmm... cmpxchg_local() should be obtained through asm/cmpxchg.h, not
> asm/atomic.h. See:
>
> grep -r define\\s*cmpxchg_local arch
But it is also here which Microblaze uses.
[linux-2.6.x]$ grep -r define\\s*cmpxchg_local include/asm-generic/
include/asm-generic/atomic.h:#define cmpxchg_local(ptr, o, n) \
(not checked on the latest but probably it is the same)
m68k, arm contains the same copy for one case
c6x, unicore, cris, blackfin, h8300, sparc32
Probably make sense to move these two macros
cmpxchg64_local and cmpxchg_local to asm-generic/cmpxchg-local.h
with #ifndef cmpxchg_local ...etc. and remove it from architectures above.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-04 11:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03 12:32 Add #includes needed to permit the removal of asm/system.h - sha1 96f951edb1f1bdbbc99b0cd458f9808bb83d58ae Michal Simek
2013-01-03 16:35 ` David Howells
2013-01-04 11:41 ` Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox