commit ba2e1c5f25a99dec3873745031ad23ce3fd79bff Merge: 7d32c0a 92183b3 Author: Linus Torvalds Date: Mon May 17 13:54:29 2010 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: amiga - Floppy platform device conversion m68k: amiga - Sound platform device conversion m68k: amiga - Frame buffer platform device conversion m68k: amiga - Zorro host bridge platform device conversion m68k: amiga - Zorro bus modalias support platform: Make platform resource input parameters const m68k: invoke oom-killer from page fault serial167: Kill unused variables m68k: Implement generic_find_next_{zero_,}le_bit() m68k: hp300 - Checkpatch cleanup m68k: Remove trailing spaces in messages m68k: Simplify param.h by using m68k: Remove BKL from rtc implementations commit 7d32c0aca4fbd0319c860d12af5fae3e88c760e6 Merge: 3d2c978 6f485b4 Author: Linus Torvalds Date: Mon May 17 13:53:35 2010 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs * git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs: logfs: handle powerfail on NAND flash logfs: handle errors from get_mtd_device() logfs: remove unused variable logfs: fix sync logfs: fix compile failure logfs: initialize li->li_refcount logfs: commit reservations under space pressure logfs: survive logfs_buf_recover read errors logfs: Close i_ino reuse race logfs: fix logfs_seek_hole() logfs: Return -EINVAL if filesystem image doesn't match LogFS: Fix typo in b6349ac8 logfs: testing the wrong variable commit 3d2c978e0cd8b1157f9eebd13062d61fb7a75ad5 Merge: 81880d6 b8bc138 Author: Linus Torvalds Date: Mon May 17 13:48:10 2010 -0700 Merge branch 'bkl/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing * 'bkl/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: ptrace: Cleanup useless header ptrace: kill BKL in ptrace syscall commit 92183b346f02773dae09182c65f16b013f295d80 Author: Geert Uytterhoeven Date: Sun Apr 5 13:02:13 2009 +0200 m68k: amiga - Floppy platform device conversion Signed-off-by: Geert Uytterhoeven commit ff2db7c5ab78817eb3c5d15dd87f18e9be726f1a Author: Geert Uytterhoeven Date: Sun Apr 5 12:59:54 2009 +0200 m68k: amiga - Sound platform device conversion Signed-off-by: Geert Uytterhoeven commit fa6688e1c7e7341fb7d1ca5878a3641762e60dec Author: Geert Uytterhoeven Date: Sun Apr 5 12:45:56 2009 +0200 m68k: amiga - Frame buffer platform device conversion Signed-off-by: Geert Uytterhoeven commit 0d305464aefff342c85b4db8b3d7a4345246e5a1 Author: Geert Uytterhoeven Date: Sun Apr 5 12:40:41 2009 +0200 m68k: amiga - Zorro host bridge platform device conversion Signed-off-by: Geert Uytterhoeven commit bf54a2b3c0dbf76136f00ff785bf6d8f6291311d Author: Geert Uytterhoeven Date: Tue Nov 18 21:13:53 2008 +0100 m68k: amiga - Zorro bus modalias support Add Amiga Zorro bus modalias and uevent support Signed-off-by: Geert Uytterhoeven commit 0b7f1a7efb38b551f5948a13d0b36e876ba536db Author: Geert Uytterhoeven Date: Wed Jan 28 21:01:02 2009 +0100 platform: Make platform resource input parameters const Make the platform resource input parameters of platform_device_add_resources() and platform_device_register_simple() const, as the resources are copied and never modified. Signed-off-by: Geert Uytterhoeven Acked-by: Greg Kroah-Hartman commit adbf6e6952e80ae42a403442dcae21438cae94b3 Author: Nick Piggin Date: Fri Apr 23 02:06:20 2010 +1000 m68k: invoke oom-killer from page fault As explained in commit 1c0fe6e3bd, we want to call the architecture independent oom killer when getting an unexplained OOM from handle_mm_fault, rather than simply killing current. Cc: linux-m68k@lists.linux-m68k.org Cc: Geert Uytterhoeven Cc: linux-arch@vger.kernel.org Signed-off-by: Nick Piggin Acked-by: David Rientjes [Geert] Kill 2 introduced compiler warnings Signed-off-by: Geert Uytterhoeven commit f3c7f317c91e45aac0ef9d0b6474cd4637de69f0 Author: Geert Uytterhoeven Date: Wed Apr 14 18:48:50 2010 +0200 serial167: Kill unused variables commits 638157bc1461f6718eeca06bedd9a09cf1f35c36 ("serial167: prepare to push BKL down into drivers") and 4165fe4ef7305609a96c7f248cefb9c414d0ede5 ("tty: Fix up char drivers request_room usage") removed code without removing the corresponding variables: | drivers/char/serial167.c: In function 'cd2401_rx_interrupt': | drivers/char/serial167.c:630: warning: unused variable 'len' | drivers/char/serial167.c: In function 'cy_ioctl': | drivers/char/serial167.c:1531: warning: unused variable 'val' Remove the variables to kill the warnings. Signed-off-by: Geert Uytterhoeven commit b52dd0077cde89111c00efc73a8db07f50ebb3e8 Author: Geert Uytterhoeven Date: Sun Feb 28 13:06:27 2010 +0100 m68k: Implement generic_find_next_{zero_,}le_bit() linux-next: fs/udf/balloc.c: In function 'udf_bitmap_new_block': fs/udf/balloc.c:274: error: implicit declaration of function 'generic_find_next_le_bit' Convert ext2_find_next_{zero_,}bit() into generic_find_next_{zero_,}le_bit(), and wrap the ext2_find_next_{zero_,}bit() around the latter. Signed-off-by: Geert Uytterhoeven commit 9881bbb269e8f287d0e55ae3384e48b26f1872f7 Author: Andrea Gelmini Date: Sat Feb 27 17:51:33 2010 +0100 m68k: hp300 - Checkpatch cleanup arch/m68k/hp300/time.h:2: WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Andrea Gelmini Signed-off-by: Geert Uytterhoeven commit b9b0d8b430ebd61d32e2a9544e75a3c4b10cddcd Author: Frans Pop Date: Sat Feb 6 18:47:11 2010 +0100 m68k: Remove trailing spaces in messages Signed-off-by: Frans Pop Signed-off-by: Geert Uytterhoeven commit 291d7e9553fef2e18825b1ef1345fbd316dff98f Author: Robert P. J. Day Date: Thu Dec 31 15:35:44 2009 -0500 m68k: Simplify param.h by using Signed-off-by: Robert P. J. Day Signed-off-by: Geert Uytterhoeven commit b1f3bb494e8acddeb972331c2ac642b3c7bceeb9 Author: Thomas Gleixner Date: Thu Oct 15 08:42:21 2009 +0000 m68k: Remove BKL from rtc implementations m68k does not support SMP. The access to the rtc is already serialized with local_irq_save/restore which is sufficient on UP. The open() protection in arch/m68k/mvme16x/rtc.c is not pretty but sufficient on UP and safe w/o the BKL. open() in arch/m68k/bvme6000/rtc.c can do with the same atomic logic as arch/m68k/mvme16x/rtc.c Signed-off-by: Thomas Gleixner Signed-off-by: Geert Uytterhoeven commit 81880d603d00c645e0890d0a44d50711c503b72b Author: Anton Blanchard Date: Mon May 17 14:34:57 2010 +1000 atomic_t: Remove volatile from atomic_t definition When looking at a performance problem on PowerPC, I noticed some awful code generation: c00000000051fc98: 3b 60 00 01 li r27,1 ... c00000000051fca0: 3b 80 00 00 li r28,0 ... c00000000051fcdc: 93 61 00 70 stw r27,112(r1) c00000000051fce0: 93 81 00 74 stw r28,116(r1) c00000000051fce4: 81 21 00 70 lwz r9,112(r1) c00000000051fce8: 80 01 00 74 lwz r0,116(r1) c00000000051fcec: 7d 29 07 b4 extsw r9,r9 c00000000051fcf0: 7c 00 07 b4 extsw r0,r0 c00000000051fcf4: 7c 20 04 ac lwsync c00000000051fcf8: 7d 60 f8 28 lwarx r11,0,r31 c00000000051fcfc: 7c 0b 48 00 cmpw r11,r9 c00000000051fd00: 40 c2 00 10 bne- c00000000051fd10 c00000000051fd04: 7c 00 f9 2d stwcx. r0,0,r31 c00000000051fd08: 40 c2 ff f0 bne+ c00000000051fcf8 c00000000051fd0c: 4c 00 01 2c isync We create two constants, write them out to the stack, read them straight back in and sign extend them. What a mess. It turns out this bad code is a result of us defining atomic_t as a volatile int. We removed the volatile attribute from the powerpc atomic_t definition years ago, but commit ea435467500612636f8f4fb639ff6e76b2496e4b (atomic_t: unify all arch definitions) added it back in. To dig up an old quote from Linus: > The fact is, volatile on data structures is a bug. It's a wart in the C > language. It shouldn't be used. > > Volatile accesses in *code* can be ok, and if we have "atomic_read()" > expand to a "*(volatile int *)&(x)->value", then I'd be ok with that. > > But marking data structures volatile just makes the compiler screw up > totally, and makes code for initialization sequences etc much worse. And screw up it does :) With the volatile removed, we see much more reasonable code generation: c00000000051f5b8: 3b 60 00 01 li r27,1 ... c00000000051f5c0: 3b 80 00 00 li r28,0 ... c00000000051fc7c: 7c 20 04 ac lwsync c00000000051fc80: 7c 00 f8 28 lwarx r0,0,r31 c00000000051fc84: 7c 00 d8 00 cmpw r0,r27 c00000000051fc88: 40 c2 00 10 bne- c00000000051fc98 c00000000051fc8c: 7f 80 f9 2d stwcx. r28,0,r31 c00000000051fc90: 40 c2 ff f0 bne+ c00000000051fc80 c00000000051fc94: 4c 00 01 2c isync Six instructions less. Signed-off-by: Anton Blanchard Signed-off-by: Linus Torvalds commit f3d46f9d3194e0329216002a8724d4c0957abc79 Author: Anton Blanchard Date: Mon May 17 14:33:53 2010 +1000 atomic_t: Cast to volatile when accessing atomic variables In preparation for removing volatile from the atomic_t definition, this patch adds a volatile cast to all the atomic read functions. Signed-off-by: Anton Blanchard Signed-off-by: Linus Torvalds commit 6f485b41875dbf5160c1990322469c1f65f77b28 Author: Joern Engel Date: Fri May 7 19:38:40 2010 +0200 logfs: handle powerfail on NAND flash The write buffer may not have been written and may no longer be written due to an interrupted write in the affected page. Signed-off-by: Joern Engel commit ccf31c10f125ab5233c8517f91d4b3bd0bd60936 Author: Dan Carpenter Date: Fri May 7 10:59:06 2010 +0200 logfs: handle errors from get_mtd_device() The get_mtd_device() function returns error pointers on failure and if we don't handle it, it leads to a crash. Signed-off-by: Dan Carpenter Signed-off-by: Joern Engel commit 58e323cf5e4ed621a6e88263aca40c3d9c3d9bfd Author: Joern Engel Date: Fri May 7 14:15:04 2010 +0200 logfs: remove unused variable Signed-off-by: Joern Engel commit c0c79c31c9d5fcc19812c6c35f842baf50ee788a Author: Joern Engel Date: Wed May 5 22:33:36 2010 +0200 logfs: fix sync Rather self-explanatory. Signed-off-by: Joern Engel commit bba0b5c2c27e6dadc93c476f8a4b49d108b66292 Author: Joern Engel Date: Wed May 5 22:32:52 2010 +0200 logfs: fix compile failure When CONFIG_BLOCK is not enabled: fs/logfs/super.c:142: error: implicit declaration of function 'bdev_get_queue' fs/logfs/super.c:142: error: invalid type argument of '->' (have 'int') Found by Randy Dunlap Signed-off-by: Joern Engel commit 24797535e18ae219be1fc2632959327075bef5da Author: Prasad Joshi Date: Tue May 4 22:13:59 2010 +0200 logfs: initialize li->li_refcount li_refcount was not re-initialized in function logfs_init_inode(), small patch that will fix the problem Signed-off-by: Prasad Joshi Signed-off-by: Joern Engel commit 05ebad852901cf9127a743df6ea10c0e8b1590c3 Author: Joern Engel Date: Tue May 4 19:41:09 2010 +0200 logfs: commit reservations under space pressure Ensures we only return -ENOSPC when there really is no space. Signed-off-by: Joern Engel commit 20503664b008e17976bff1fdbc693c77ebd6f6c9 Author: Joern Engel Date: Mon May 3 20:54:34 2010 +0200 logfs: survive logfs_buf_recover read errors Refusing to mount beats a kernel crash. Signed-off-by: Joern Engel commit ccc0197b02178f7e1707e659cbc5242fc94b499a Author: Joern Engel Date: Sat May 1 17:00:34 2010 +0200 logfs: Close i_ino reuse race logfs_seek_hole() may return the same offset it is passed as argument. Found by Prasad Joshi Signed-off-by: Joern Engel commit bd2b3f29594c50d7c5bd864d9af05d440394ee82 Author: Joern Engel Date: Sat May 1 17:33:06 2010 +0200 logfs: fix logfs_seek_hole() logfs_seek_hole(inode, 0x200) would crap itself if the inode contained just 0x1ff (or fewer) blocks. Signed-off-by: Joern Engel commit ad342631f13d40aa787b9e5aaf4800f10d6c3647 Author: Joern Engel Date: Tue Apr 27 13:45:31 2010 +0200 logfs: Return -EINVAL if filesystem image doesn't match Signed-off-by: Joern Engel commit 2e531fa0d0868f5114c2b3a782ab02eb9d6f914d Author: Joern Engel Date: Thu Apr 29 14:56:37 2010 +0200 LogFS: Fix typo in b6349ac8 Signed-off-by: Joern Engel commit 3272c8a57b77a7277a740e211fe12171e4b37e99 Author: Dan Carpenter Date: Wed Apr 21 12:33:54 2010 +0200 logfs: testing the wrong variable There is a typo here. We should test "last" instead of "first". Signed-off-by: Dan Carpenter Signed-off-by: Joern Engel commit b8bc1389b74c2b66255651a6fcfae56c78b6e63f Author: Alessio Igor Bogani Date: Sun Apr 25 13:18:48 2010 +0200 ptrace: Cleanup useless header BKL isn't present anymore into this file thus we can safely remove smp_lock.h inclusion. Signed-off-by: Alessio Igor Bogani Cc: Roland McGrath Cc: Oleg Nesterov Cc: Andrew Morton Cc: James Morris Cc: Ingo Molnar Signed-off-by: Frederic Weisbecker commit 5534ecb2dda04345e8243901e0e49599228b4273 Author: Arnd Bergmann Date: Sat Feb 27 19:49:37 2010 +0100 ptrace: kill BKL in ptrace syscall The comment suggests that this usage is stale. There is no bkl in the exec path so if there is a race lurking there, the bkl in ptrace is not going to help in this regard. Overview of the possibility of "accidental" races this bkl might protect: - ptrace_traceme() is protected against task removal and concurrent read/write on current->ptrace as it locks write tasklist_lock. - arch_ptrace_attach() is serialized by ptrace_traceme() against concurrent PTRACE_TRACEME or PTRACE_ATTACH - ptrace_attach() is protected the same way ptrace_traceme() and in turn serializes arch_ptrace_attach() - ptrace_check_attach() does its own well described serializing too. There is no obvious race here. Signed-off-by: Arnd Bergmann Signed-off-by: Frederic Weisbecker Acked-by: Oleg Nesterov Acked-by: Roland McGrath Cc: Andrew Morton Cc: Roland McGrath