20 Jul, 2008
1 commit
-
[...]
CC init/main.o
include/asm/bitops.h: In function `start_kernel':
include/asm/bitops.h:76: warning: asm operand 2 probably doesn't match
constraints
include/asm/bitops.h:76: warning: asm operand 2 probably doesn't match
constraints
include/asm/bitops.h:76: warning: asm operand 2 probably doesn't match
constraints
include/asm/bitops.h:76: error: impossible constraint in `asm'
include/asm/bitops.h:76: error: impossible constraint in `asm'
include/asm/bitops.h:76: error: impossible constraint in `asm'
make[1]: *** [init/main.o] Error 1
[...]The build error is caused by the ages old gcc bug where gcc at the time of
analyzing the constraints is unable to figure out that an "i" constraint
actually can be satisfied and thus will abort unless an "r" is added to
the constraint. For the actual code generation gcc will only ever use the
"i" constraint.Signed-off-by: Ralf Baechle
16 Jul, 2008
1 commit
-
The third operand to 'ins' must be a constant int, not a register.
[Ralf: The bug was actually intensional. Some versions used to throw an
error under certain circumstances for code like:static inline void f(unsigned nr, unsigned *p)
{
unsigned short bit = nr & 5;if (__builtin_constant_p(bit)) {
__asm__ __volatile__ (" foo %0, %1" : "=m" (*p) : "i" (bit));
} else {
/* Do something else. */
}
}because gcc was not able to figure out that the "i" constraint was possibly
at the early stage when the constraint are getting verified. The solution
was using "ri" instead of "i". The "ri" would keep gcc happy but in the
end for code generation always the "i" constraint would be satisfied. The
problem afair originally appeared in the i386 io.h and also hit it's mips
equivalent. From there the workaround spread to many of the inline
assembler functions.]Signed-off-by: David Daney
Signed-off-by: Ralf Baechle
12 May, 2008
2 commits
-
56a6b1eb7bfb5ace0b5cb9c149f502fbd101b8ab was a bit too conservative and
left __ilog2 around which is only used as an internal function for other
bitops.Signed-off-by: Ralf Baechle
-
Only MIPS32 and MIPS64 CPUs implement clz/dclz. Therefore don't export
__ilog2() for non MIPS32/MIPS64 cpus and use generic __fls bitop code for
these cpus.Signed-off-by: Thomas Bogendoerfer
Signed-off-by: Ralf Baechle
27 Apr, 2008
1 commit
-
Implement __fls on all 64-bit archs:
alpha has an implementation of fls64.
Added __fls(x) = fls64(x) - 1.ia64 has fls, but not __fls.
Added __fls based on code of fls.mips and powerpc have __ilog2, which is the same as __fls.
Added __fls = __ilog2.parisc, s390, sh and sparc64:
Include generic __fls.x86_64 already has __fls.
Signed-off-by: Alexander van Heukelum
Signed-off-by: Ingo Molnar
20 Oct, 2007
1 commit
-
forbid asm/bitops.h direct inclusion
Because of compile errors that may occur after bit changes if asm/bitops.h is
included directly without e.g. linux/kernel.h which includes linux/bitops.h,
forbid direct inclusion of asm/bitops.h. Thanks to Adrian Bunk.Signed-off-by: Jiri Slaby
Cc: Adrian Bunk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Oct, 2007
3 commits
-
mips can avoid one mb when acquiring a lock with test_and_set_bit_lock.
Signed-off-by: Nick Piggin
Cc: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Documentation/atomic_ops.txt defines these primitives must contain a memory
barrier both before and after their memory operation. This is consistent with
the atomic ops implementation on mips.Signed-off-by: Nick Piggin
Cc: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Introduce test_and_set_bit_lock / clear_bit_unlock bitops with lock semantics.
Convert all architectures to use the generic implementation.Signed-off-by: Nick Piggin
Acked-By: David Howells
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Russell King
Cc: Haavard Skinnemoen
Cc: Bryan Wu
Cc: Mikael Starvik
Cc: David Howells
Cc: Yoshinori Sato
Cc: "Luck, Tony"
Cc: Hirokazu Takata
Cc: Geert Uytterhoeven
Cc: Roman Zippel
Cc: Greg Ungerer
Cc: Ralf Baechle
Cc: Kyle McMartin
Cc: Matthew Wilcox
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Heiko Carstens
Cc: Martin Schwidefsky
Cc: Paul Mundt
Cc: Kazumoto Kojima
Cc: Richard Curnow
Cc: William Lee Irwin III
Cc: "David S. Miller"
Cc: Jeff Dike
Cc: Paolo 'Blaisorblade' Giarrusso
Cc: Miles Bader
Cc: Andi Kleen
Cc: Chris Zankel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Oct, 2007
1 commit
-
Signed-off-by: Ralf Baechle
21 Jul, 2007
1 commit
-
None of weakly ordered processor supported in tree need this but it seems
like this could change ...Signed-off-by: Ralf Baechle
27 Jun, 2007
1 commit
-
Fix a sparse warning caused by 2c921d07f8c641e691b0dfd80a5cfe14c60ec489
include2/asm/bitops.h:313:23: warning: symbol 'res' shadows an earlier one
include2/asm/bitops.h:309:16: originally declared hereSigned-off-by: Atsushi Nemoto
Signed-off-by: Ralf Baechle
12 Jun, 2007
1 commit
-
Signed-off-by: Ralf Baechle
17 Mar, 2007
1 commit
-
trace_hardirqs_off -> atomic_inc -> local_irq_restore -> trace_hardirqs_off
Signed-off-by: Ralf Baechle
07 Mar, 2007
1 commit
-
Signed-off-by: Ralf Baechle
19 Feb, 2007
1 commit
-
Add R2 optimized variants of clear_bit, set_bit and test_and_clear_bit.
With gcc 4.1.1 this saves 1592 bytes on a defconfig (minus IPv6) kernel.
Turns out that R2 bitop instructions are no gain for the other bitop
functions.Signed-off-by: Ralf Baechle
14 Feb, 2007
1 commit
-
Now that finally all supported versions of binutils have functioning
support for .subsection use .subsection to tweak the branch predictionI did not modify the R10000 errata variants because it seems unclear if
this will invalidate the workaround which actually relies on the cheesy
prediction of branch likely to cause a misspredict if the sc was
successful.Signed-off-by: Ralf Baechle
05 Dec, 2006
1 commit
-
Also the R4000 / R4600 LL/SC instructions imply a sync so no explicit sync
needed.Signed-off-by: Ralf Baechle
30 Nov, 2006
2 commits
-
Signed-off-by: Ralf Baechle
-
Signed-off-by: Ralf Baechle
14 Jul, 2006
1 commit
-
Signed-off-by: Ralf Baechle
29 Apr, 2006
1 commit
27 Apr, 2006
1 commit
-
With recent rewrite for generic bitops, fls() for 32bit kernel with
MIPS64_CPU is broken. Also, ffs(), fls() should be defined the same
way as the libc and compiler built-in routines (returns int instead of
unsigned long).Signed-off-by: Atsushi Nemoto
Signed-off-by: Ralf Baechle
26 Apr, 2006
1 commit
-
Signed-off-by: David Woodhouse
27 Mar, 2006
2 commits
-
- remove __{,test_and_}{set,clear,change}_bit() and test_bit()
- unless defined(CONFIG_CPU_MIPS32) or defined(CONFIG_CPU_MIPS64)
- remove __ffs()
- remove ffs()
- remove ffz()
- remove fls()- remove fls64()
- remove find_{next,first}{,_zero}_bit()
- remove sched_find_first_bit()
- remove generic_hweight64()
- remove generic_hweight{32,16,8}()
- remove ext2_{set,clear,test,find_first_zero,find_next_zero}_bit()
- remove ext2_{set,clear}_bit_atomic()
- remove minix_{test,set,test_and_clear,test,find_first_zero}_bit()Signed-off-by: Akinobu Mita
Cc: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Bitmap functions for the minix filesystem and the ext2 filesystem except
ext2_set_bit_atomic() and ext2_clear_bit_atomic() do not require the atomic
guarantees.But these are defined by using atomic bit operations on several architectures.
(cris, frv, h8300, ia64, m32r, m68k, m68knommu, mips, s390, sh, sh64, sparc,
sparc64, v850, and xtensa)This patch switches to non atomic bit operation.
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Feb, 2006
1 commit
-
fls was the only called of flz, so fold flz into fls, same for the
__ilog2 call. Delete the now unused flz function.Signed-off-by: Ralf Baechle
04 Jan, 2006
1 commit
-
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
30 Oct, 2005
4 commits
-
Signed-off-by: Ralf Baechle
-
Signed-off-by: Ralf Baechle
-
for assembling ll/sc sequences to avoid problems with 64-bit
configurations.Signed-off-by: Ralf Baechle
-
builds even for processors that don't support the instructions.
Plus minor formatting fixes.Signed-off-by: Ralf Baechle
05 Sep, 2005
2 commits
-
Signed-off-by: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Start cleaning 32-bit vs. 64-bit configuration.
Signed-off-by: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Apr, 2005
1 commit
-
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.Let it rip!