The patch titled AVR32: Fix output constraints in asm/bitops.h has been added to the -mm tree. Its filename is avr32-fix-output-constraints-in-asm-bitopsh.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: AVR32: Fix output constraints in asm/bitops.h From: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx> When copying a few files from one nfs-mounted directory to another, I suddenly saw this: Unable to handle kernel paging request at virtual address 00100028 [ 1001.372000] pc = 9002bed0 [ 1001.376000] ptbr = 90438610 pgd = 10400c66 pte = 00000000 [ 1001.380000] [ 1001.380000] Oops in arch/avr32/mm/fault.c::do_page_fault, line 247[#3]: [ 1001.380000] Modules linked in: [ 1001.380000] PC is at page_cache_readahead_adaptive+0x32/0x90a [ 1001.380000] LR is at 0x63 [ 1001.380000] pc : [<9002bed0>] lr : [<00000063>] Not tainted [ 1001.380000] sp : 90495d34 r12: 90240c68 r11: 90495df4 [ 1001.380000] r10: 90497870 r9 : 00000028 r8 : 00100028 [ 1001.380000] r7 : 90495d80 r6 : 00000063 r5 : 90495df4 r4 : 00000000 [ 1001.380000] r3 : 00000000 r2 : 00000064 r1 : 00000063 r0 : 90497870 caused by the following invalid code in page_cache_readahead_adaptive(): 9002bec8: d2 53 ssrf 0x5 9002beca: 70 09 ld.w r9,r8[0x0] 9002becc: 12 98 mov r8,r9 9002bece: b5 c9 cbr r9,0x14 9002bed0: f1 79 00 00 stcond r8[0],r9 This is an inline assembly block from test_and_clear_bit(). Here, r8 is used both as "old" and as the memory address of *p because "old" isn't marked as an earlyclobber operand. Fix this and similar bugs by making all similar output constraints in asm/bitops.h earlyclobber. Signed-off-by: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/asm-avr32/bitops.h | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff -puN include/asm-avr32/bitops.h~avr32-fix-output-constraints-in-asm-bitopsh include/asm-avr32/bitops.h --- a/include/asm-avr32/bitops.h~avr32-fix-output-constraints-in-asm-bitopsh +++ a/include/asm-avr32/bitops.h @@ -40,7 +40,7 @@ static inline void set_bit(int nr, volat " sbr %0, %3\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p) + : "=&r"(tmp), "=o"(*p) : "m"(*p), "i"(nr) : "cc"); } else { @@ -51,7 +51,7 @@ static inline void set_bit(int nr, volat " or %0, %3\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p) + : "=&r"(tmp), "=o"(*p) : "m"(*p), "r"(mask) : "cc"); } @@ -79,7 +79,7 @@ static inline void clear_bit(int nr, vol " cbr %0, %3\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p) + : "=&r"(tmp), "=o"(*p) : "m"(*p), "i"(nr) : "cc"); } else { @@ -90,7 +90,7 @@ static inline void clear_bit(int nr, vol " andn %0, %3\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p) + : "=&r"(tmp), "=o"(*p) : "m"(*p), "r"(mask) : "cc"); } @@ -117,7 +117,7 @@ static inline void change_bit(int nr, vo " eor %0, %3\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p) + : "=&r"(tmp), "=o"(*p) : "m"(*p), "r"(mask) : "cc"); } @@ -144,7 +144,7 @@ static inline int test_and_set_bit(int n " sbr %0, %4\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p), "=r"(old) + : "=&r"(tmp), "=o"(*p), "=&r"(old) : "m"(*p), "i"(nr) : "memory", "cc"); } else { @@ -154,7 +154,7 @@ static inline int test_and_set_bit(int n " or %0, %2, %4\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p), "=r"(old) + : "=&r"(tmp), "=o"(*p), "=&r"(old) : "m"(*p), "r"(mask) : "memory", "cc"); } @@ -184,7 +184,7 @@ static inline int test_and_clear_bit(int " cbr %0, %4\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p), "=r"(old) + : "=&r"(tmp), "=o"(*p), "=&r"(old) : "m"(*p), "i"(nr) : "memory", "cc"); } else { @@ -195,7 +195,7 @@ static inline int test_and_clear_bit(int " andn %0, %4\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p), "=r"(old) + : "=&r"(tmp), "=o"(*p), "=&r"(old) : "m"(*p), "r"(mask) : "memory", "cc"); } @@ -223,7 +223,7 @@ static inline int test_and_change_bit(in " eor %0, %2, %4\n" " stcond %1, %0\n" " brne 1b" - : "=r"(tmp), "=o"(*p), "=r"(old) + : "=&r"(tmp), "=o"(*p), "=&r"(old) : "m"(*p), "r"(mask) : "memory", "cc"); @@ -239,7 +239,7 @@ static inline unsigned long __ffs(unsign asm("brev %1\n\t" "clz %0,%1" - : "=r"(result), "=r"(word) + : "=r"(result), "=&r"(word) : "1"(word)); return result; } _ Patches currently in -mm which might be from hskinnemoen@xxxxxxxxx are git-mtd.patch avr32-arch.patch avr32-config_debug_bugverbose-and-config_frame_pointer.patch avr32-fix-invalid-constraints-for-stcond.patch avr32-add-support-for-irq-flags-state-tracing.patch avr32-turn-off-support-for-discontigmem-and-sparsemem.patch avr32-always-enable-config_embedded.patch avr32-export-the-find__bit-functions.patch avr32-add-defconfig-for-at32stk1002.patch avr32-use-autoconf-instead-of-marker.patch avr32-dont-assume-anything-about-max_nr_zones.patch avr32-add-i-o-port-access-primitives.patch avr32-use-linux-pfnh.patch avr32-kill-config_discontigmem-support-completely.patch avr32-fix-bug-in-__avr32_asr64.patch avr32-switch-to-generic-timekeeping-framework.patch avr32-set-kbuild_defconfig.patch avr32-kprobes-compile-fix.patch avr32-asm-ioh-should-include-asm-byteorderh.patch avr32-fix-output-constraints-in-asm-bitopsh.patch generic-ioremap_page_range-implementation.patch generic-ioremap_page_range-flush_cache_vmap.patch generic-ioremap_page_range-alpha-conversion.patch generic-ioremap_page_range-avr32-conversion.patch generic-ioremap_page_range-cris-conversion.patch generic-ioremap_page_range-i386-conversion.patch generic-ioremap_page_range-i386-conversion-fix.patch generic-ioremap_page_range-m32r-conversion.patch generic-ioremap_page_range-mips-conversion.patch generic-ioremap_page_range-mips-conversion-fix.patch generic-ioremap_page_range-parisc-conversion.patch generic-ioremap_page_range-s390-conversion.patch generic-ioremap_page_range-sh-conversion.patch generic-ioremap_page_range-sh64-conversion.patch generic-ioremap_page_range-x86_64-conversion.patch generic-ioremap_page_range-x86_64-conversion-fix.patch namespaces-add-nsproxy-avr32-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html