commit 8be1a6d6c77ab4532e4476fdb8177030ef48b52c Merge: 852fef6... cc9969c... Author: Linus Torvalds Date: Sat Jul 26 20:40:36 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: mlx4: Update/add Mellanox Technologies copyright lines to mlx4 driver files mlx4_core: Add VLAN tag field to WQE control segment struct RDMA/nes: CM connection setup/teardown rework IPoIB: Correct help text for INFINIBAND_IPOIB_DEBUG IPoIB/cm: Connected mode is no longer EXPERIMENTAL RDMA/ucm: BKL is not needed for ib_ucm_open() RDMA/ucma: BKL is not needed for ucma_open() commit 852fef69c0d9510a28a70221cfddd004efa02552 Author: Oliver Neukum Date: Sat Jul 26 22:42:42 2008 +0200 fix for a memory leak in an error case introduced by fix for double free The fix NULLed a pointer without freeing it. Signed-off-by: Oliver Neukum Reported-by: Juha Motorsportcom Signed-off-by: Linus Torvalds commit 9ee08c2df47c10ba624ff05a6c0f2500748bcb69 Merge: eaf0ba5... 3d45955... Author: Linus Torvalds Date: Sat Jul 26 20:30:56 2008 -0700 Merge git://git.infradead.org/mtd-2.6 * git://git.infradead.org/mtd-2.6: (57 commits) [MTD] [NAND] subpage read feature as a way to increase performance. CPUFREQ: S3C24XX NAND driver frequency scaling support. [MTD][NAND] au1550nd: remove unused variable [MTD] jedec_probe: Fix SST 16-bit chip detection [MTD][MTDPART] Fix a division by zero bug [MTD][MTDPART] Cleanup and document the erase region handling [MTD][MTDPART] Handle most checkpatch findings [MTD][MTDPART] Seperate main loop from per-partition code in add_mtd_partition [MTD] physmap: resume already suspended chips on failure to suspend [MTD] physmap: Fix suspend/resume/shutdown bugs. [MTD] [NOR] Fix -ETIMEO errors in CFI driver [MTD] [NAND] fsl_elbc_nand: fix section mismatch with CONFIG_MTD_OF_PARTS=y [JFFS2] Use .unlocked_ioctl [MTD] Fix const assignment in the MTD command line partitioning driver [MTD] [NOR] gen_probe: No debug message when debugging is disabled [MTD] [NAND] remove __PPC__ hardcoded address from DiskOnChip drivers [MTD] [MAPS] Remove the bast-flash driver. [MTD] [NAND] fsl_elbc_nand: ecclayout cleanups [MTD] [NAND] fsl_elbc_nand: implement support for flash-based BBT [MTD] [NAND] fsl_elbc_nand: fix OOB workability for large page NAND chips ... commit eaf0ba5ef69538b6913525294a3a0fcb0e0992e0 Merge: 732730d... a9906a1... Author: Linus Torvalds Date: Sat Jul 26 20:29:39 2008 -0700 Merge branch 'tracehook' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace * 'tracehook' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace: tracehook: comment fixes commit 732730d48dc777f6577a6e0fece42b860324998e Author: Geert Uytterhoeven Date: Sun Jul 27 01:39:52 2008 +0200 m68k: gs: use tty_port fixes commit b5391e29f428d11755ca2c91074c6db6f5c69d7c ("gs: use tty_port") forgot to update the m68k gs serial drivers. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds commit bdee6ac7d1c9a4a9b65db1753b0bfa0b61361dde Merge: 4836e30... deec9ae... Author: Linus Torvalds Date: Sat Jul 26 20:27:31 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: atmel-mci: debugfs support mmc: Add per-card debugfs support mmc: Export internal host state through debugfs imxmmc: fix crash when no platform data is provided imxmmc: fix platform resources imxmmc: remove DEBUG definition mmc_spi: put signals to low power off fix commit 4836e3007882984279ca63d3c42bf0b14616eb78 Merge: 5c7c204... 4e1e018... Author: Linus Torvalds Date: Sat Jul 26 20:23:44 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (39 commits) [PATCH] fix RLIM_NOFILE handling [PATCH] get rid of corner case in dup3() entirely [PATCH] remove remaining namei_{32,64}.h crap [PATCH] get rid of indirect users of namei.h [PATCH] get rid of __user_path_lookup_open [PATCH] f_count may wrap around [PATCH] dup3 fix [PATCH] don't pass nameidata to __ncp_lookup_validate() [PATCH] don't pass nameidata to gfs2_lookupi() [PATCH] new (local) helper: user_path_parent() [PATCH] sanitize __user_walk_fd() et.al. [PATCH] preparation to __user_walk_fd cleanup [PATCH] kill nameidata passing to permission(), rename to inode_permission() [PATCH] take noexec checks to very few callers that care Re: [PATCH 3/6] vfs: open_exec cleanup [patch 4/4] vfs: immutable inode checking cleanup [patch 3/4] fat: dont call notify_change [patch 2/4] vfs: utimes cleanup [patch 1/4] vfs: utimes: move owner check into inode_change_ok() [PATCH] vfs: use kstrdup() and check failing allocation ... commit 5c7c204aeca51ccfad63caab4fcdc5d8026c0fd8 Merge: 2284284... 3712b42... Author: Linus Torvalds Date: Sat Jul 26 20:19:41 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6: Add layer1 over IP support Add mISDN HFC multiport driver Add mISDN HFC PCI driver Add mISDN DSP Add mISDN core files Define AF_ISDN and PF_ISDN Add mISDN driver commit 228428428138e231a155464239880201e5cc8b44 Merge: 78681ac... 6c3b8fc... Author: Linus Torvalds Date: Sat Jul 26 20:17:56 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: netns: fix ip_rt_frag_needed rt_is_expired netfilter: nf_conntrack_extend: avoid unnecessary "ct->ext" dereferences netfilter: fix double-free and use-after free netfilter: arptables in netns for real netfilter: ip{,6}tables_security: fix future section mismatch selinux: use nf_register_hooks() netfilter: ebtables: use nf_register_hooks() Revert "pkt_sched: sch_sfq: dump a real number of flows" qeth: use dev->ml_priv instead of dev->priv syncookies: Make sure ECN is disabled net: drop unused BUG_TRAP() net: convert BUG_TRAP to generic WARN_ON drivers/net: convert BUG_TRAP to generic WARN_ON commit 78681ac08a611313595d13cafabae1183b71ef48 Author: Randy Dunlap Date: Sat Jul 26 15:22:28 2008 -0700 firmware: fix memmap printk format warnings Fix firmware/memmap printk format warnings: drivers/firmware/memmap.c:156: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t' drivers/firmware/memmap.c:161: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t' Signed-off-by: Randy Dunlap Cc: Bernhard Walle Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b8f14b41026fb7d7e9a4af2a4128a702d07ad26 Author: Adrian Bunk Date: Sat Jul 26 15:22:28 2008 -0700 mm/util.c must #include mm/util.c: In function 'arch_pick_mmap_layout': mm/util.c:144: error: dereferencing pointer to incomplete type mm/util.c:145: error: 'arch_get_unmapped_area' undeclared (first use in this function) mm/util.c:145: error: (Each undeclared identifier is reported only once mm/util.c:145: error: for each function it appears in.) mm/util.c:146: error: 'arch_unmap_area' undeclared (first use in this function) Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 510a35d4a47802f4a0028aa6bd2ca2170da5e32f Author: Andrea Righi Date: Sat Jul 26 15:22:27 2008 -0700 hugetlb: remove unused variable warning Remove the following warning when CONFIG_HUGETLB_PAGE is not set: ipc/shm.c: In function `shm_get_stat': ipc/shm.c:565: warning: unused variable `h' [akpm@linux-foundation.org: use tabs, not spaces] Signed-off-by: Andrea Righi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b2d002dba5a8a4c0c3ec96fd1ff3c9def6bd71a1 Author: Andrea Righi Date: Sat Jul 26 15:22:27 2008 -0700 task IO accounting: correctly account threads IO statistics Oleg Nesterov points out that we should check that the task is still alive before we iterate over the threads. This patch includes a fixup for this. Also simplify do_io_accounting() implementation. Signed-off-by: Andrea Righi Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a9436d0c3cbe8941b1acd5b0736d355295cad98 Author: Michael Buesch Date: Sat Jul 26 15:22:26 2008 -0700 gpiolib: fix typo in comment This fixes an off-by-one error in a comment. Signed-off-by: Michael Buesch Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e1e018ecc6f7bfd10fc75b3ff9715cc8164e0a2 Author: Al Viro Date: Sat Jul 26 16:01:20 2008 -0400 [PATCH] fix RLIM_NOFILE handling * dup2() should return -EBADF on exceeded sysctl_nr_open * dup() should *not* return -EINVAL even if you have rlimit set to 0; it should get -EMFILE instead. Check for orig_start exceeding rlimit taken to sys_fcntl(). Failing expand_files() in dup{2,3}() now gets -EMFILE remapped to -EBADF. Consequently, remaining checks for rlimit are taken to expand_files(). Signed-off-by: Al Viro commit 6c5d0512a091480c9f981162227fdb1c9d70e555 Author: Al Viro Date: Sat Jul 26 13:38:19 2008 -0400 [PATCH] get rid of corner case in dup3() entirely Since Ulrich is OK with getting rid of dup3(fd, fd, flags) completely, to hell the damn thing goes. Corner case for dup2() is handled in sys_dup2() (complete with -EBADF if dup2(fd, fd) is called with fd that is not open), the rest is done in dup3(). Signed-off-by: Al Viro commit 4cc38a1b383f0c6c65a3fef4ff8144e8000e4ec3 Author: Al Viro Date: Sat Jul 26 03:48:26 2008 -0400 [PATCH] remove remaining namei_{32,64}.h crap Signed-off-by: Al Viro commit 3f8206d496e9e9495afb1d4e70d29712b4d403c9 Author: Al Viro Date: Sat Jul 26 03:46:43 2008 -0400 [PATCH] get rid of indirect users of namei.h fs.h needs path.h, not namei.h; nfs_fs.h doesn't need it at all. Several places in the tree needed direct include. Signed-off-by: Al Viro commit 964bd183624c03680796b63b4ab97ee3905a806a Author: Al Viro Date: Sat Jul 26 03:33:14 2008 -0400 [PATCH] get rid of __user_path_lookup_open Signed-off-by: Al Viro commit 516e0cc5646f377ab80fcc2ee639892eccb99853 Author: Al Viro Date: Sat Jul 26 00:39:17 2008 -0400 [PATCH] f_count may wrap around make it atomic_long_t; while we are at it, get rid of useless checks in affs, hfs and hpfs - ->open() always has it equal to 1, ->release() - to 0. Signed-off-by: Al Viro commit 3c333937ee3be114b181c4861188cfe8f6a59697 Author: Ulrich Drepper Date: Fri Jul 25 22:32:13 2008 -0400 [PATCH] dup3 fix Al Viro notice one cornercase that the new dup3() code. The dup2() function, as a special case, handles dup-ing to the same file descriptor. In this case the current dup3() code does nothing at all. I.e., it ingnores the flags parameter. This shouldn't happen, the close-on-exec flag should be set if requested. In case the O_CLOEXEC bit in the flags parameter is not set the dup3() function should behave in this respect identical to dup2(). This means dup3(fd, fd, 0) should not actively reset the c-o-e flag. The patch below implements this minor change. [AV: credits to Artur Grabowski for bringing that up as potential subtle point in dup2() behaviour] Signed-off-by: Ulrich Drepper Signed-off-by: Al Viro commit 58ec42b061bf5dad8fa0370a19966cfd96eaf80c Author: Al Viro Date: Wed Jul 23 14:45:55 2008 -0400 [PATCH] don't pass nameidata to __ncp_lookup_validate() Signed-off-by: Al Viro commit a569c711f63995ad80c23918525111e0cdb0bc73 Author: Al Viro Date: Wed Jul 23 14:42:05 2008 -0400 [PATCH] don't pass nameidata to gfs2_lookupi() Signed-off-by: Al Viro commit 2ad94ae654f5eb72fd3260b706aea645cf4a7791 Author: Al Viro Date: Mon Jul 21 09:32:51 2008 -0400 [PATCH] new (local) helper: user_path_parent() Preparation to untangling intents mess: reduce the number of do_path_lookup() callers. Signed-off-by: Al Viro commit 2d8f30380ab8c706f4e0a8f1aaa22b5886e9ac8a Author: Al Viro Date: Tue Jul 22 09:59:21 2008 -0400 [PATCH] sanitize __user_walk_fd() et.al. * do not pass nameidata; struct path is all the callers want. * switch to new helpers: user_path_at(dfd, pathname, flags, &path) user_path(pathname, &path) user_lpath(pathname, &path) user_path_dir(pathname, &path) (fail if not a directory) The last 3 are trivial macro wrappers for the first one. * remove nameidata in callers. Signed-off-by: Al Viro commit 256984a83880ff7ac78055cb87baea48137f0b77 Author: Al Viro Date: Tue Jul 22 08:09:30 2008 -0400 [PATCH] preparation to __user_walk_fd cleanup Almost all users __user_walk_fd() and friends care only about struct path. Get rid of the few that do not. Signed-off-by: Al Viro commit f419a2e3b64def707e1384ee38abb77f99af5f6d Author: Al Viro Date: Tue Jul 22 00:07:17 2008 -0400 [PATCH] kill nameidata passing to permission(), rename to inode_permission() Incidentally, the name that gives hundreds of false positives on grep is not a good idea... Signed-off-by: Al Viro commit 30524472c2f728c20d6bf35191042a5d455c0a64 Author: Al Viro Date: Tue Jul 22 00:02:33 2008 -0400 [PATCH] take noexec checks to very few callers that care Signed-off-by: Al Viro commit e56b6a5dda1a36ffaa532df6f975ea324298fa4d Author: Christoph Hellwig Date: Mon May 19 07:53:34 2008 +0200 Re: [PATCH 3/6] vfs: open_exec cleanup On Mon, May 19, 2008 at 12:01:49AM +0200, Marcin Slusarz wrote: > open_exec is needlessly indented, calls ERR_PTR with 0 argument > (which is not valid errno) and jumps into middle of function > just to return value. > So clean it up a bit. Still looks rather messy. See below for a better version. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit beb29e058c35ab69e96e455a12ccf7505f6de425 Author: Miklos Szeredi Date: Tue Jul 1 15:01:29 2008 +0200 [patch 4/4] vfs: immutable inode checking cleanup Move the immutable and append-only checks from chmod, chown and utimes into notify_change(). Checks for immutable and append-only files are always performed by the VFS and not by the filesystem (see permission() and may_...() in namei.c), so these belong in notify_change(), and not in inode_change_ok(). This should be completely equivalent. CC: Ulrich Drepper CC: Michael Kerrisk Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro commit b1da47e29e467f1ec36dc78d009bfb109fd533c7 Author: Miklos Szeredi Date: Tue Jul 1 15:01:28 2008 +0200 [patch 3/4] fat: dont call notify_change The FAT_IOCTL_SET_ATTRIBUTES ioctl() calls notify_change() to change the file mode before changing the inode attributes. Replace with explicit calls to security_inode_setattr(), fat_setattr() and fsnotify_change(). This is equivalent to the original. The reason it is needed, is that later in the series we move the immutable check into notify_change(). That would break the FAT_IOCTL_SET_ATTRIBUTES ioctl, as it needs to perform the mode change regardless of the immutability of the file. [Fix error if fat is built as a module. Thanks to OGAWA Hirofumi for noticing.] Signed-off-by: Miklos Szeredi Acked-by: OGAWA Hirofumi Signed-off-by: Al Viro commit e9b76fedc61235da80b6b7f81dfd67ec224dfb49 Author: Miklos Szeredi Date: Tue Jul 1 15:01:27 2008 +0200 [patch 2/4] vfs: utimes cleanup Untange the mess that is do_utimes(). Add kerneldoc comment to do_utimes(). CC: Ulrich Drepper CC: Michael Kerrisk Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro commit 9767d74957450da6365c363d69e3d02d605d7375 Author: Miklos Szeredi Date: Tue Jul 1 15:01:26 2008 +0200 [patch 1/4] vfs: utimes: move owner check into inode_change_ok() Add a new ia_valid flag: ATTR_TIMES_SET, to handle the UTIMES_OMIT/UTIMES_NOW and UTIMES_NOW/UTIMES_OMIT cases. In these cases neither ATTR_MTIME_SET nor ATTR_ATIME_SET is in the flags, yet the POSIX draft specifies that permission checking is performed the same way as if one or both of the times was explicitly set to a timestamp. See the path "vfs: utimensat(): fix error checking for {UTIME_NOW,UTIME_OMIT} case" by Michael Kerrisk for the patch introducing this behavior. This is a cleanup, as well as allowing filesystems (NFS/fuse/...) to perform their own permission checking instead of the default. CC: Ulrich Drepper CC: Michael Kerrisk Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro commit 88b387824fdaecb6ba0f471acf0aadf7d24739fd Author: Li Zefan Date: Mon Jul 21 18:06:36 2008 +0800 [PATCH] vfs: use kstrdup() and check failing allocation - use kstrdup() instead of kmalloc() + memcpy() - return NULL if allocating ->mnt_devname failed - mnt_devname should be const Signed-off-by: Li Zefan Acked-by: Cyrill Gorcunov Signed-off-by: Al Viro commit 672b16b2f66c149888bd876a4f92342112205fe1 Author: Al Viro Date: Thu Jul 17 09:45:01 2008 -0400 [PATCH] more nameidata removal: exec_permission_lite() doesn't need it Signed-off-by: Al Viro commit b77b0646ef4efe31a7449bb3d9360fd00f95433d Author: Al Viro Date: Thu Jul 17 09:37:02 2008 -0400 [PATCH] pass MAY_OPEN to vfs_permission() explicitly ... and get rid of the last "let's deduce mask from nameidata->flags" bit. Signed-off-by: Al Viro commit a110343f0d6d41f68b7cf8c00b57a3172c67f816 Author: Al Viro Date: Thu Jul 17 09:19:08 2008 -0400 [PATCH] fix MAY_CHDIR/MAY_ACCESS/LOOKUP_ACCESS mess * MAY_CHDIR is redundant - it's an equivalent of MAY_ACCESS * MAY_ACCESS on fuse should affect only the last step of pathname resolution * fchdir() and chroot() should pass MAY_ACCESS, for the same reason why chdir() needs that. * now that we pass MAY_ACCESS explicitly in all cases, LOOKUP_ACCESS can be removed; it has no business being in nameidata. Signed-off-by: Al Viro commit 7f2da1e7d0330395e5e9e350b879b98a1ea495df Author: Al Viro Date: Sat May 10 20:44:54 2008 -0400 [PATCH] kill altroot long overdue... Signed-off-by: Al Viro commit 8bb79224b87aab92071e94d46e70bd160d89bf34 Author: Al Viro Date: Wed Jul 16 09:51:03 2008 -0400 [PATCH] permission checks for chdir need special treatment only on the last step ... so we ought to pass MAY_CHDIR to vfs_permission() instead of having it triggered on every step of preceding pathname resolution. LOOKUP_CHDIR is killed by that. Signed-off-by: Al Viro commit db2e747b14991a4c6a5c98b0e5f552a193237c03 Author: Miklos Szeredi Date: Tue Jun 24 16:50:16 2008 +0200 [patch 5/5] vfs: remove mode parameter from vfs_symlink() Remove the unused mode parameter from vfs_symlink and callers. Thanks to Tetsuo Handa for noticing. CC: Tetsuo Handa Signed-off-by: Miklos Szeredi commit 7e79eedb3b22200cc8b774baea3a7bf28d766101 Author: Tetsuo Handa Date: Tue Jun 24 16:50:15 2008 +0200 [patch 4/5] vfs: reuse local variable in vfs_link() Why not reuse "inode" which is assigned as struct inode *inode = old_dentry->d_inode; in the beginning of vfs_link() ? Signed-off-by: Tetsuo Handa Signed-off-by: Miklos Szeredi commit 2f1936b87783a3a56c9441b27b9ba7a747f11e8e Author: Miklos Szeredi Date: Tue Jun 24 16:50:14 2008 +0200 [patch 3/5] vfs: change remove_suid() to file_remove_suid() All calls to remove_suid() are made with a file pointer, because (similarly to file_update_time) it is called when the file is written. Clean up callers by passing in a file instead of a dentry. Signed-off-by: Miklos Szeredi commit c82e42da8a6b2f3a85dc4d4278cb8238702f8f64 Author: Miklos Szeredi Date: Tue Jun 24 16:50:12 2008 +0200 [patch 1/5] vfs: truncate: dont check immutable twice vfs_permission(MAY_WRITE) already checked for the inode being immutable, so no need to repeat it. Signed-off-by: Miklos Szeredi Acked-by: Christoph Hellwig commit e6305c43eda10ebfd2ad9e35d6e172ccc7bb3695 Author: Al Viro Date: Tue Jul 15 21:03:57 2008 -0400 [PATCH] sanitize ->permission() prototype * kill nameidata * argument; map the 3 bits in ->flags anybody cares about to new MAY_... ones and pass with the mask. * kill redundant gfs2_iop_permission() * sanitize ecryptfs_permission() * fix remaining places where ->permission() instances might barf on new MAY_... found in mask. The obvious next target in that direction is permission(9) folded fix for nfs_permission() breakage from Miklos Szeredi Signed-off-by: Al Viro commit 1bd5191d9f5d1928c4efdf604c4164b04bb88dbe Author: Miklos Szeredi Date: Wed May 21 19:15:03 2008 +0200 [patch 05/14] hpfs: dont call permission() hpfs_unlink() calls permission() prior to truncating the file. HPFS doesn't define a .permission method, so replace with explicit call to generic_permission(). This is equivalent, except that devcgroup_inode_permission() and security_inode_permission() are not called. The truncation is just an implementation detail of the unlink, so these security checks are unnecessary. I suspect that even calling generic_permission() is unnecessary, since we shouldn't mind if the file isn't writable. But I leave that to the maintainer to decide. Signed-off-by: Miklos Szeredi CC: Mikulas Patocka commit 9043476f726802f4b00c96d0c4f418dde48d1304 Author: Al Viro Date: Tue Jul 15 08:54:06 2008 -0400 [PATCH] sanitize proc_sysctl * keep references to ctl_table_head and ctl_table in /proc/sys inodes * grab the former during operations, use the latter for access to entry if that succeeds * have ->d_compare() check if table should be seen for one who does lookup; that allows us to avoid flipping inodes - if we have the same name resolve to different things, we'll just keep several dentries and ->d_compare() will reject the wrong ones. * have ->lookup() and ->readdir() scan the table of our inode first, then walk all ctl_table_header and scan ->attached_by for those that are attached to our directory. * implement ->getattr(). * get rid of insane amounts of tree-walking * get rid of the need to know dentry in ->permission() and of the contortions induced by that. Signed-off-by: Al Viro commit ae7edecc9b8810770a8e5cb9a466ea4bdcfa8401 Author: Al Viro Date: Tue Jul 15 06:33:31 2008 -0400 [PATCH] sysctl: keep track of tree relationships In a sense, that's the heart of the series. It's based on the following property of the trees we are actually asked to add: they can be split into stem that is already covered by registered trees and crown that is entirely new. IOW, if a/b and a/c/d are introduced by our tree, then a/c is also introduced by it. That allows to associate tree and table entry with each node in the union; while directory nodes might be covered by many trees, only one will cover the node by its crown. And that will allow much saner logics for /proc/sys in the next patches. This patch introduces the data structures needed to keep track of that. When adding a sysctl table, we find a "parent" one. Which is to say, find the deepest node on its stem that already is present in one of the tables from our table set or its ancestor sets. That table will be our parent and that node in it - attachment point. Add our table to list anchored in parent, have it refer the parent and contents of attachment point. Also remember where its crown lives. Signed-off-by: Al Viro commit bd7b1533cd6a68c734062aa69394bec7e2b1718e Author: Al Viro Date: Tue Jul 15 16:00:59 2008 -0400 [PATCH] sysctl: make sure that /proc/sys/net/ipv4 appears before per-ns ones Massage ipv4 initialization - make sure that net.ipv4 appears as non-per-net-namespace before it shows up in per-net-namespace sysctls. That's the only change outside of sysctl.c needed to get sane ordering rules and data structures for sysctls (esp. for procfs side of that mess). Signed-off-by: Al Viro commit f7e6ced4061da509f737541ca4dbd44d83a6e82f Author: Al Viro Date: Tue Jul 15 01:44:23 2008 -0400 [PATCH] allow delayed freeing of ctl_table_header Refcount the sucker; instead of freeing it by the end of unregistration just drop the refcount and free only when it hits zero. Make sure that we _always_ make ->unregistering non-NULL in start_unregistering(). That allows anybody to get a reference to such puppy, preventing its freeing and reuse. It does *not* block unregistration. Anybody who holds such a reference can * try to grab a "use" reference (ctl_head_grab()); that will succeeds if and only if it hadn't entered unregistration yet. If it succeeds, we can use it in all normal ways until we release the "use" reference (with ctl_head_finish()). Note that this relies on having ->unregistering become non-NULL in all cases when one starts to unregister the sucker. * keep pointers to ctl_table entries; they *can* be freed if the entire thing is unregistered. However, if ctl_head_grab() succeeds, we know that unregistration had not happened (and will not happen until ctl_head_finish()) and such pointers can be used safely. IOW, now we can have inodes under /proc/sys keep references to ctl_table entries, protecting them with references to ctl_table_header and grabbing the latter for the duration of operations that require access to ctl_table. That won't cause deadlocks, since unregistration will not be stopped by mere keeping a reference to ctl_table_header. Signed-off-by: Al Viro commit 734550921e9b7ab924a43aa3d0bd4239dac4fbf1 Author: Al Viro Date: Mon Jul 14 21:22:20 2008 -0400 [PATCH] beginning of sysctl cleanup - ctl_table_set New object: set of sysctls [currently - root and per-net-ns]. Contains: pointer to parent set, list of tables and "should I see this set?" method (->is_seen(set)). Current lists of tables are subsumed by that; net-ns contains such a beast. ->lookup() for ctl_table_root returns pointer to ctl_table_set instead of that to ->list of that ctl_table_set. [folded compile fixes by rdd for configs without sysctl] Signed-off-by: Al Viro commit 7ac6cd653d7c31ad6b7bb5b88c549c4ebf628c34 Author: Miklos Szeredi Date: Tue Jul 1 23:07:54 2008 +0200 [patch] hppfs: remove hppfs_permission hppfs_permission() is equivalent to the '.permission == NULL' case. Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro commit d2d9648ec6858e19d16a0b16da62534e85888653 Author: Denys Vlasenko Date: Tue Jul 1 14:16:09 2008 +0200 [PATCH] reuse xxx_fifo_fops for xxx_pipe_fops Merge fifo and pipe file_operations. Signed-off-by: Denys Vlasenko Signed-off-by: Al Viro commit d70b67c8bc72ee23b55381bd6a884f4796692f77 Author: Miklos Szeredi Date: Wed Jul 2 21:30:15 2008 +0200 [patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clear out the directory dentry and its children, releasing the inode. But for UBIFS this causes problems because its orphan area can overflow. Fix this by returning ENOENT for all lookups on a S_DEAD directory before creating a child dentry. Thanks to Zoltan Sogor for noticing this while testing UBIFS, and Artem for the excellent analysis of the problem and testing. Reported-by: Artem Bityutskiy Tested-by: Artem Bityutskiy Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro commit 6c3b8fc618905d7599dcc514c99ce4293d476f39 Author: Hugh Dickins Date: Sat Jul 26 17:51:06 2008 -0700 netns: fix ip_rt_frag_needed rt_is_expired Running recent kernels, and using a particular vpn gateway, I've been having to edit my mails down to get them accepted by the smtp server. Git bisect led to commit e84f84f276473dcc673f360e8ff3203148bdf0e2 - netns: place rt_genid into struct net. The conversion from a != test to rt_is_expired() put one negative too many: and now my mail works. Signed-off-by: Hugh Dickins Acked-by: Denis V. Lunev Signed-off-by: David S. Miller commit 6c64825bf40ecc1b01610762ca736b18c8a9db92 Author: Patrick McHardy Date: Sat Jul 26 17:50:05 2008 -0700 netfilter: nf_conntrack_extend: avoid unnecessary "ct->ext" dereferences As Linus points out, "ct->ext" and "new" are always equal, avoid unnecessary dereferences and use "new" directly. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 93bc4e89c260d91576840c4881d1066d84ccd422 Author: Pekka Enberg Date: Sat Jul 26 17:49:33 2008 -0700 netfilter: fix double-free and use-after free As suggested by Patrick McHardy, introduce a __krealloc() that doesn't free the original buffer to fix a double-free and use-after-free bug introduced by me in netfilter that uses RCU. Reported-by: Patrick McHardy Signed-off-by: Pekka Enberg Tested-by: Dieter Ries Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 3918fed5f31213067c1c345bd904e1ea369e6819 Author: Alexey Dobriyan Date: Sat Jul 26 17:48:59 2008 -0700 netfilter: arptables in netns for real IN, FORWARD -- grab netns from in device, OUT -- from out device. Signed-off-by: Alexey Dobriyan Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit f858b4869a9136dd28cc2ab37f8b89268cc99462 Author: Alexey Dobriyan Date: Sat Jul 26 17:48:38 2008 -0700 netfilter: ip{,6}tables_security: fix future section mismatch Currently not visible, because NET_NS is mutually exclusive with SYSFS which is required by SECURITY. Signed-off-by: Alexey Dobriyan Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 6c5a9d2e1599a099b0e47235a1c1502162b14310 Author: Alexey Dobriyan Date: Sat Jul 26 17:48:15 2008 -0700 selinux: use nf_register_hooks() Signed-off-by: Alexey Dobriyan Acked-by: James Morris Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit e40f51a36a6ca718e829c0933ab1e79333ac932e Author: Alexey Dobriyan Date: Sat Jul 26 17:47:53 2008 -0700 netfilter: ebtables: use nf_register_hooks() Signed-off-by: Alexey Dobriyan Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 3712b42d4b1bec29a4232a6673bf2e6dcc5faa68 Author: Karsten Keil Date: Sun Jul 27 02:02:10 2008 +0200 Add layer1 over IP support Implement a ISDN over IP tunnel to use mISDN hardware on remote locations. Signed-off-by: Karsten Keil commit af69fb3a8ffa37e986db00ed93099dc44babeef4 Author: Karsten Keil Date: Sun Jul 27 02:00:43 2008 +0200 Add mISDN HFC multiport driver Enable support for cards with Cologne Chip AG's HFC multiport chip. Signed-off-by: Karsten Keil commit 1700fe1a10dc0eaac0ef60a8093eaeafa9bff9ae Author: Karsten Keil Date: Sat Jul 26 18:55:28 2008 +0200 Add mISDN HFC PCI driver Enable support for card with Cologne Chip AG's HFC PCIbased cards Signed-off-by: Karsten Keil commit 960366cf8dbb3359afaca30cf7fdbf69a6d6dda7 Author: Karsten Keil Date: Sun Jul 27 01:56:38 2008 +0200 Add mISDN DSP Enable support for digital audio processing capability. This module may be used for special applications that require cross connecting of bchannels, conferencing, dtmf decoding echo cancelation, tone generation, and Blowfish encryption and decryption. It may use hardware features if available. Signed-off-by: Karsten Keil commit 1b2b03f8e514e4f68e293846ba511a948b80243c Author: Karsten Keil Date: Sun Jul 27 01:54:58 2008 +0200 Add mISDN core files Add mISDN core files Signed-off-by: Karsten Keil commit 04578dd330f1ec6bc9c4233833bee0d0ca73ff09 Author: Karsten Keil Date: Sat Jul 26 18:52:34 2008 +0200 Define AF_ISDN and PF_ISDN Define the address and protocol family value for mISDN. Signed-off-by: Karsten Keil commit e4ac9bc1f6686dcb8c34e2756aa93cc9546fa6ae Author: Karsten Keil Date: Sat Jul 26 18:52:11 2008 +0200 Add mISDN driver mISDN is a new modular ISDN driver, in the long term it should replace the old I4L driver architecture for passiv ISDN cards. Signed-off-by: Karsten Keil commit deec9ae31e6079551ce9260d29a4cf83e5b19a83 Author: Haavard Skinnemoen Date: Thu Jul 24 14:18:59 2008 +0200 atmel-mci: debugfs support Create additional files under the host's debugfs directory containing additional host-specific debug information. Signed-off-by: Haavard Skinnemoen Signed-off-by: Pierre Ossman commit f4b7f927b531ca350cfc4ca1bdc3377dac7f9a32 Author: Haavard Skinnemoen Date: Thu Jul 24 14:18:58 2008 +0200 mmc: Add per-card debugfs support For each card successfully added to the bus, create a subdirectory under the host's debugfs root with information about the card. At the moment, only a single file is added to the card directory for all cards: "state". It reflects the "state" field in struct mmc_card, indicating whether the card is present, readonly, etc. For MMC and SD cards (not SDIO), another file is added: "status". Reading this file will ask the card about its current status and return it. This can be useful if the card just refuses to respond to any commands, which might indicate that the card state is not what the MMC core thinks it is (due to a missing stop command, for example.) Signed-off-by: Haavard Skinnemoen Signed-off-by: Pierre Ossman commit 6edd8ee60ac9b974bd6ec3b1bcb2aab02762fa8c Author: Haavard Skinnemoen Date: Thu Jul 24 14:18:57 2008 +0200 mmc: Export internal host state through debugfs When CONFIG_DEBUG_FS is set, create a few files under /sys/kernel/debug containing information about an mmc host's internal state. Currently, just a single file is created, "ios", which contains information about the current operating parameters for the bus (clock speed, bus width, etc.) Host drivers can add additional files and directories under the host's root directory by passing the debugfs_root field in struct mmc_host as the 'parent' parameter to debugfs_create_*. Signed-off-by: Haavard Skinnemoen Signed-off-by: Pierre Ossman commit c5d5e9c40fc6cabedd5fdc7441e6e9d37f5c9bba Author: Paulius Zaleckas Date: Wed Jul 9 16:03:20 2008 +0300 imxmmc: fix crash when no platform data is provided Don't crash if no platform data is provided. In this case assume that card is present. Signed-off-by: Paulius Zaleckas Acked-by: Pavel Pisa Signed-off-by: Pierre Ossman commit 5fc63dfba8a016caf832572aeaa90abef82f0ba0 Author: Paulius Zaleckas Date: Wed Jul 9 16:03:17 2008 +0300 imxmmc: fix platform resources Fixup platform resources handling. Signed-off-by: Paulius Zaleckas Acked-by: Pavel Pisa Signed-off-by: Pierre Ossman commit 322069c9df1fd4da269b2a57d78f753684962523 Author: Paulius Zaleckas Date: Wed Jul 9 16:03:13 2008 +0300 imxmmc: remove DEBUG definition Removed DEBUG #define #undef, because module is automaticaly compiled with -DDEBUG when CONFIG_MMC_DEBUG is defined. Currently it just generates compiler warning about redefinition. Signed-off-by: Paulius Zaleckas Acked-by: Pavel Pisa Signed-off-by: Pierre Ossman commit a9906a19193db69ad0158f289f839edf8aaf103f Author: Roland McGrath Date: Sat Jul 26 14:41:26 2008 -0700 tracehook: comment fixes This fixes some typos and errors in comments. No code changes. Signed-off-by: Roland McGrath commit cc9969c96765476db5e30c9e074a57838604c1d1 Merge: 5ba18b1... 9905922... 51a379d... 6492cdf... Author: Roland Dreier Date: Sat Jul 26 13:59:47 2008 -0700 Merge branches 'bkl-removal', 'ipoib', 'mlx4' and 'nes' into for-linus commit a048d3aff8b828b6c0fa7ddd90a531248ab4e0f9 Merge: fb3b806... 1fe3710... Author: Linus Torvalds Date: Sat Jul 26 13:25:47 2008 -0700 Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: ftrace: fix modular build ftrace: disable tracing on acpi idle calls ftrace: remove latency-tracer leftover ftrace: only trace preempt off with preempt tracer ftrace: fix 4d3702b6 (post-v2.6.26): WARNING: at kernel/lockdep.c:2731 check_flags (ftrace) commit fb3b80614438f8b73b3879a19350439d6aa402da Merge: 7f268a2... 3a61ec3... Author: Linus Torvalds Date: Sat Jul 26 13:25:05 2008 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, AMD IOMMU: include amd_iommu_last_bdf in device initialization x86: fix IBM Summit based systems' phys_cpu_present_map on 32-bit kernels x86, RDC321x: remove gpio.h complications x86, RDC321x: add to mach-default crashdump: fix undefined reference to `elfcorehdr_addr' flag parameters: fix compile error of sys_epoll_create1 commit 7f268a2ba7c884a239713696238dd4207a57dd9a Merge: 689796a... 2d20098... Author: Linus Torvalds Date: Sat Jul 26 13:23:17 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (30 commits) Blackfin arch: If we double fault, rather than hang forever, reset Blackfin arch: When icache is off, make sure people know it Blackfin arch: Fix bug - skip single step in high priority interrupt handler instead of disabling all interrupts in single step debugging. Blackfin arch: cache the values of vco/sclk/cclk as the overhead of doing so (~24 bytes) is worth avoiding the software mult/div routines Blackfin arch: fix bug - IMDMA is not type struct dma_register Blackfin arch: check the EXTBANKS field of the DDRCTL1 register to see if we are using both memory banks Blackfin arch: Apply Bluetechnix CM-BF527 board support patch Blackfin arch: Add unwinding for stack info, and a little more detail on trace buffer Blackfin arch: Add ISP1760 board resources to BF548-EZKIT Blackfin arch: fix bug - detect 0.1 silicon revision BF527-EZKIT as 0.0 version Blackfin arch: add missing IORESOURCE_MEM flags to UART3 Blackfin arch: Add return value check in bfin_sir_probe(), remove SSYNC(). Blackfin arch: Extend sram malloc to handle L2 SRAM. Blackfin arch: Remove useless config option. Blackfin arch: change L1 malloc to base on slab cache and lists. Blackfin arch: use local labels and ENDPROC() markings Blackfin arch: Do not need this dualcore test module in kernel. Blackfin arch: Allow ptrace to peek and poke application data in L1 data SRAM. Blackfin arch: Add ANOMALY_05000368 workaround Blackfin arch: Functional power management support ... commit 689796a141cea79d745a4689c65dd01c39e5e100 Author: Geert Uytterhoeven Date: Sat Jul 26 17:15:05 2008 +0200 dsp56k: Fix BKL pushdown commit 236b8756a2b6f90498d45b2c36d43e5372f2d4b8 ("dsp56k: BKL pushdown") removed the `struct inode *inode' parameter from dsp56k_ioctl(), but forgot to update the use of `inode' in the first line of the function. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds commit 37e67b75804b84e092ae9f1d7a19dc3522ef78ab Author: Huang Weiyi Date: Sat Jul 26 19:37:57 2008 +0800 drivers/video/fbmem.c: removed duplicated include Removed duplicated include in drivers/video/fbmem.c Signed-off-by: Huang Weiyi Signed-off-by: Linus Torvalds commit 4b1fefaca9f5fdd43b24aa248777a75a81dfa8d6 Merge: 6ca813c... e2d2867... Author: Linus Torvalds Date: Sat Jul 26 12:45:32 2008 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: When verifying the decoded header before decoding the object identifier [CIFS] Fix warnings from checkpatch [CIFS] Fix improper endian conversion of ACL subauth field [CIFS] Fix possible double free if search immediately after search rewind fails [CIFS] remove checkpatch warning Signed-off-by: Alexey Dobriyan cifs: assorted endian annotations [CIFS] break ATTR_SIZE changes out into their own function lockdep: annotate cifs in-kernel sockets [CIFS] Fix compiler warning on 64-bit commit 6ca813c4e515d9b868cd71703ef15f4af3aebb21 Author: Adrian Bunk Date: Fri Jul 25 19:46:27 2008 -0700 video/stifb.c: make 2 functions static This patch makes the following needlessly global functions static: - stifb_init_fb() - stifb_init() Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d1e412ac5570a669e1b1fc5fd0f6859250c3d76 Author: Adrian Bunk Date: Fri Jul 25 19:46:26 2008 -0700 video/console/stico{n,re}.c: make code static This patch makes the following needlessly global code static: - sticon.c: sticonsole_init() - sticore.c: struct default_sti - sticore.c: sti_init_graph() - sticore.c: sti_inq_conf() - sticore.c: sti_rom_copy() - sticore.c: sti_select_fbfont() - sticore.c: sti_select_font() - sticore.c: sti_get_wmode_rom() - sticore.c: sti_read_rom() [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 511e7483abe1ab433d8ab7a7998f799042b52941 Author: Adrian Bunk Date: Fri Jul 25 19:46:26 2008 -0700 make macfb_setup() static This patch makes the needlessly global macfb_setup() static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f56f6d30c75984d0aba2656eaeb35f3806395191 Author: Adrian Bunk Date: Fri Jul 25 19:46:25 2008 -0700 make init/do_mounts.c:root_device_name static This patch makes the needlessly global root_device_name static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9580d85f9cdb076c4bfb467bc6c0d3c5e499957a Author: Adrian Bunk Date: Fri Jul 25 19:46:25 2008 -0700 drivers/char/rtc.c: make 2 functions static The following functions can now become static: - rtc_interrupt() - rtc_get_rtc_time() Signed-off-by: Adrian Bunk Acked-by: Bernhard Walle Acked-by: Paul Gortmaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7c363b8c6536f26934172d3c46f0bbec01a97c61 Author: Adrian Bunk Date: Fri Jul 25 19:46:24 2008 -0700 mm/swapfile.c: make code static This patch makes the following needlessly global code static: - swap_lock - nr_swapfiles - struct swap_list Signed-off-by: Adrian Bunk Reviewed-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 15f59adae001766a2c7f7fe4f196387bb04bcff5 Author: Adrian Bunk Date: Fri Jul 25 19:46:23 2008 -0700 make mm/memory.c:print_bad_pte() static This patch makes the needlessly global print_bad_pte() static. Signed-off-by: Adrian Bunk Reviewed-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d8fddfb17aaee4ffc5e3d0560620d0fa8b50a42 Author: Adrian Bunk Date: Fri Jul 25 19:46:23 2008 -0700 mm/allocpercpu.c: make 4 functions static This patch makes the following needlessly global functions static: - percpu_depopulate() - __percpu_depopulate_mask() - percpu_populate() - __percpu_populate_mask() Signed-off-by: Adrian Bunk Acked-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9e5c6da71e89fa25ced6e88182225a99941bec90 Author: Adrian Bunk Date: Fri Jul 25 19:46:22 2008 -0700 make mm/sparse.c: make a function static This patch makes the needlessly global sparse_early_mem_map_alloc() static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23d5f96ce6571da51c0f6bfa7361e5f91f314b2b Author: Adrian Bunk Date: Fri Jul 25 19:46:22 2008 -0700 make parport_cs_release() static This patch makes the needlessly global parport_cs_release() static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 25cdcd0086d97a011fcd0c1ff572e30da24790ec Author: Adrian Bunk Date: Fri Jul 25 19:46:21 2008 -0700 make pnp_add_card_id() static pnp_add_card_id() can now become static. Signed-off-by: Adrian Bunk Cc: Bjorn Helgaas Cc: Rene Herman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 96930a6365c99c160138a395566e360b27348b8f Author: Adrian Bunk Date: Fri Jul 25 19:46:21 2008 -0700 make cgroup_seqfile_release() static cgroup_seqfile_release() can become static. Signed-off-by: Adrian Bunk Acked-by: Paul Menage Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0e1451da4f928ae1c9d5ca617faebde9f02985db Author: Adrian Bunk Date: Fri Jul 25 19:46:20 2008 -0700 drm: make drm_minors_cleanup() static Make the needlessly global drm_minors_cleanup() static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4074d93dd4e8f46f727840baa2be02d544fd17f Author: Johannes Weiner Date: Fri Jul 25 19:46:20 2008 -0700 cris: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: Mikael Starvik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e275e0a687e83add62b10e6d36b67f0964455469 Author: Johannes Weiner Date: Fri Jul 25 19:46:19 2008 -0700 frv: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() where show_mem() calls show_free_areas(). Signed-off-by: Johannes Weiner Acked-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aca532016f49eca0341ed7be5885d6c63ca69e63 Author: Johannes Weiner Date: Fri Jul 25 19:46:18 2008 -0700 m32r: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free swap pages, printed by show_swap_cache_info() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Cc: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 969eefb516b71f8abadf5bc4861a672694f48c38 Author: Johannes Weiner Date: Fri Jul 25 19:46:18 2008 -0700 m68k: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ec5e0edd155385cb59cb9857de3176524ba4ff8 Author: Johannes Weiner Date: Fri Jul 25 19:46:17 2008 -0700 m68knommu: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: Greg Ungerer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e66ddf1a4593d9bec8623782b94d7b50cc58cec5 Author: Johannes Weiner Date: Fri Jul 25 19:46:16 2008 -0700 mips: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). And show_mem() does now actually print something on configurations with multiple nodes. Signed-off-by: Johannes Weiner Acked-by: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4bad9ea20146860d726ac14a53206da6be132b98 Author: Johannes Weiner Date: Fri Jul 25 19:46:16 2008 -0700 h8300: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4984d2d88805609e7702e8ee72b5e148c992ae7b Author: Johannes Weiner Date: Fri Jul 25 19:46:15 2008 -0700 mn10300: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bda2fa535564ace56a395d5b65c6dc81305401fa Author: Johannes Weiner Date: Fri Jul 25 19:46:14 2008 -0700 powerpc: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c55281dee09a843dd6bf5070324b86b84847e6ea Author: Johannes Weiner Date: Fri Jul 25 19:46:14 2008 -0700 s390: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: Heiko Carstens Cc: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 03da6bfb5b40d454f5439ea905a68441aab23637 Author: Johannes Weiner Date: Fri Jul 25 19:46:13 2008 -0700 sh: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in slab, printed by show_free_areas() - free swap pages, printed by show_swap_cache_info() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 471a54239a1c8a09cd12733d4e28db2aeebedb59 Author: Johannes Weiner Date: Fri Jul 25 19:46:12 2008 -0700 sparc64: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free swap pages, printed by show_swap_cache_info() - pages in swapcache, printed by show_swap_cache_info() - dirty pages, writeback pages, mapped pages, slab pages, pagetables pages, printed by show_free_areas() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79b0cbd113a9de1eaa3322528ccaeb97bd9189cc Author: Johannes Weiner Date: Fri Jul 25 19:46:12 2008 -0700 um: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free swap pages, printed by show_swap_cache_info() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8dad322f5449010c14990dd6934878f576b2ee60 Author: Johannes Weiner Date: Fri Jul 25 19:46:11 2008 -0700 x86: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - pages in swapcache, printed by show_swap_cache_info() - dirty pages, writeback pages, mapped pages, slab pages, pagetable pages, printed by show_free_areas() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47221222a59a565e11954c078a2cf6a07a7e690e Author: Johannes Weiner Date: Fri Jul 25 19:46:10 2008 -0700 xtensa: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Cc: Chris Zankel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a2e9c44337b53aef37f3382920a478cac3777ba9 Author: Johannes Weiner Date: Fri Jul 25 19:46:10 2008 -0700 blackfin: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: Bryan Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 46244a2b3c1dfd83041bcf0428c584d3a66b30cc Author: Johannes Weiner Date: Fri Jul 25 19:46:09 2008 -0700 avr32: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - pages in slabs, printed by show_free_areas() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Acked-by: Haavard Skinnemoen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f834b9f3bd3769162fc169efd7ecae0712a2d1d Author: Johannes Weiner Date: Fri Jul 25 19:46:09 2008 -0700 alpha: use generic show_mem() Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - free pages, printed by show_free_areas() - free swap pages, printed by show_swap_cache_info() - pages in swapcache, printed by show_swap_cache_info() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner Cc: Richard Henderson Cc: Ivan Kokshaysky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 454c63b02e530f10b4345343f63596dd705888d0 Author: Johannes Weiner Date: Fri Jul 25 19:46:07 2008 -0700 lib: generic show_mem() This implements a platform-independent version of show_mem(). Signed-off-by: Johannes Weiner Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Haavard Skinnemoen Cc: Bryan Wu Cc: Chris Zankel Cc: Ingo Molnar Cc: Jeff Dike Cc: David S. Miller Cc: Paul Mundt Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: David Howells Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Yoshinori Sato Cc: Ralf Baechle Cc: Greg Ungerer Cc: Geert Uytterhoeven Cc: Roman Zippel Cc: Hirokazu Takata Cc: Mikael Starvik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c97b7fc0d8c8661981beb9517da342ced3b3bc7 Author: Johannes Weiner Date: Fri Jul 25 19:46:01 2008 -0700 mm: print swapcache page count in show_swap_cache_info() Every arch implements its own show_mem() function. Most of them share quite some code, some of them are completely identical. This series implements a generic version of this function and migrates almost all architectures to it. This patch: Most show_mem() implementations calculate the amount of pages within the swapcache every time. Move the output to a more appropriate place and use the anyway available total_swapcache_pages variable. Signed-off-by: Johannes Weiner Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Haavard Skinnemoen Cc: Bryan Wu Cc: Chris Zankel Cc: Ingo Molnar Cc: Jeff Dike Cc: David S. Miller Cc: Paul Mundt Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: David Howells Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Yoshinori Sato Cc: Ralf Baechle Cc: Greg Ungerer Cc: Geert Uytterhoeven Cc: Roman Zippel Cc: Hirokazu Takata Cc: Mikael Starvik Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ebcb67341fee34061430f3367f2e507e52ee051b Author: Roland McGrath Date: Fri Jul 25 19:46:00 2008 -0700 /proc/PID/syscall This adds /proc/PID/syscall and /proc/PID/task/TID/syscall magic files. These use task_current_syscall() to show the task's current system call number and argument registers, stack pointer and PC. For a task blocked but not in a syscall, the file shows "-1" in place of the syscall number, followed by only the SP and PC. For a task that's not blocked, it shows "running". Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbc698636ed48b6fcd323964e0f847a6a796325d Author: Roland McGrath Date: Fri Jul 25 19:45:59 2008 -0700 task_current_syscall This adds the new function task_current_syscall() on machines where the asm/syscall.h interface is supported (CONFIG_HAVE_ARCH_TRACEHOOK). It's exported for modules to use in the future. This function safely samples the state of a blocked thread to collect what system call it is blocked in, and the six system call argument registers. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 85ba2d862e521375a8ee01526c5c46b1f24bb4af Author: Roland McGrath Date: Fri Jul 25 19:45:58 2008 -0700 tracehook: wait_task_inactive This extends wait_task_inactive() with a new argument so it can be used in a "soft" mode where it will check for the task changing state unexpectedly and back off. There is no change to existing callers. This lays the groundwork to allow robust, noninvasive tracing that can try to sample a blocked thread but back off safely if it wakes up. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f5a4ad97a0e7b663d527ecc02aabe203d000d91 Author: Roland McGrath Date: Fri Jul 25 19:45:57 2008 -0700 tracehook: CONFIG_HAVE_ARCH_TRACEHOOK This adds the generic HAVE_ARCH_TRACEHOOK kconfig item. Each arch should add to some Kconfig file: select HAVE_ARCH_TRACEHOOK if the arch code uses all the latest hooks to enable newfangled tracing and debugging code. The comment in arch/Kconfig lists all the prerequisite arch support. When all these are available, setting HAVE_ARCH_TRACEHOOK will allow enabling any new features that depend on the modern arch interfaces. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 828c365cc8b8d38c346fccb19fa80d28f2240831 Author: Roland McGrath Date: Fri Jul 25 19:45:57 2008 -0700 tracehook: asm/syscall.h This adds asm-generic/syscall.h, which documents what a real asm-ARCH/syscall.h file should define. This is not used yet, but will provide all the machine-dependent details of examining a user system call about to begin, in progress, or just ended. Each arch should add an asm-ARCH/syscall.h that defines all the entry points documented in asm-generic/syscall.h, as short inlines if possible. This lets us write new tracing code that understands user system call registers, without any new arch-specific work. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 64b1208d5b0ef8859fd52ea7ae286a3eb994669b Author: Roland McGrath Date: Fri Jul 25 19:45:56 2008 -0700 tracehook: TIF_NOTIFY_RESUME This adds tracehook.h inlines to enable a new arch feature in support of user debugging/tracing. This is not used yet, but it lays the groundwork for a debugger to be able to wrangle a task that's possibly running, without interrupting its syscalls in progress. Each arch should define TIF_NOTIFY_RESUME, and in their entry.S code treat it much like TIF_SIGPENDING. That is, it causes you to take the slow path when returning to user mode, where you get the full user-mode state accessible as for signal handling or ptrace. The arch code should check TIF_NOTIFY_RESUME after handling TIF_SIGPENDING. When it's set, clear it and then call tracehook_notify_resume(). In future, tracing code will call set_notify_resume() when it wants to get a callback in tracehook_notify_resume(). Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b787f7ba677840da16a2228c16571ce8a1fcb799 Author: Roland McGrath Date: Fri Jul 25 19:45:55 2008 -0700 tracehook: force signal_pending() This defines a new hook tracehook_force_sigpending() that lets tracing code decide to force TIF_SIGPENDING on in recalc_sigpending(). This is not used yet, so it compiles away to nothing for now. It lays the groundwork for new tracing code that can interrupt a task synthetically without actually sending a signal. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b2a1ff64afbadac842bbc58c5166962cf4f7664 Author: Roland McGrath Date: Fri Jul 25 19:45:54 2008 -0700 tracehook: death This moves the ptrace logic in task death (exit_notify) into tracehook.h inlines. Some code is rearranged slightly to make things nicer. There is no change, only cleanup. There is one hook called with the tasklist_lock write-locked, as ptrace needs. There is also a new hook called after exit_state changes and without locks. This is a better place for tracing work to be in the future, since it doesn't delay the whole system with locking. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa00b80b3c41a845b3d56f866fb40a2e98754c51 Author: Roland McGrath Date: Fri Jul 25 19:45:54 2008 -0700 tracehook: job control This defines the tracehook_notify_jctl() hook to formalize the ptrace effects on the job control notifications. There is no change, only cleanup. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7bcf6a2ca5f639b038c48711ebe6c4eca2036641 Author: Roland McGrath Date: Fri Jul 25 19:45:53 2008 -0700 tracehook: get_signal_to_deliver This defines the tracehook_get_signal() hook to allow tracing code to slip in before normal signal dequeuing. This lays the groundwork for new tracing features that can inject synthetic signals outside the normal queue or control the disposition of delivered signals. The calling convention lets tracehook_get_signal() decide both exactly what will happen and what signal number to report in the handler/exit. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 283d7559e7712f95a05331eb0a85394c6368101b Author: Roland McGrath Date: Fri Jul 25 19:45:52 2008 -0700 tracehook: syscall This adds standard tracehook.h inlines for arch code to call when TIF_SYSCALL_TRACE has been set. This replaces having each arch implement the ptrace guts for its syscall tracing support. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 445a91d2fe3667fb8fc251433645f686933cf56a Author: Roland McGrath Date: Fri Jul 25 19:45:52 2008 -0700 tracehook: tracehook_consider_fatal_signal This defines tracehook_consider_fatal_signal() has a fine-grained hook for deciding to skip the special cases for a fatal signal, as ptrace does. There is no change, only cleanup. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 35de254dc60f91004b3b5ebb1fc7b2c3093d6032 Author: Roland McGrath Date: Fri Jul 25 19:45:51 2008 -0700 tracehook: tracehook_consider_ignored_signal This defines tracehook_consider_ignored_signal() has a fine-grained hook for deciding to prevent the normal short-circuit of sending an ignored signal, as ptrace does. There is no change, only cleanup. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c45aea27617d6a1e0aacddc3b0233f704222fcbd Author: Roland McGrath Date: Fri Jul 25 19:45:50 2008 -0700 tracehook: tracehook_signal_handler This defines tracehook_signal_handler() as a hook for the arch signal handling code to call. It gives ptrace the opportunity to stop for a pseudo-single-step trap immediately after signal handler setup is done. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa8e26ccd485216fc45c8c2dd1ec3b7ef1a0a2f8 Author: Roland McGrath Date: Fri Jul 25 19:45:50 2008 -0700 tracehook: tracehook_expect_breakpoints This adds tracehook_expect_breakpoints() as a formal hook for the nommu code to use for its, "Is text-poking likely?" check at mmap time. This names the actual semantics the code means to test, and documents it. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d094efeb1e98010c6b99923f1eb7e17bf1e3a74 Author: Roland McGrath Date: Fri Jul 25 19:45:49 2008 -0700 tracehook: tracehook_tracer_task This adds the tracehook_tracer_task() hook to consolidate all forms of "Who is using ptrace on me?" logic. This is used for "TracerPid:" in /proc and for permission checks. We also clean up the selinux code the called an identical accessor. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dae33574dcf5211e1f43c7e45fa29f73ba3e00cb Author: Roland McGrath Date: Fri Jul 25 19:45:48 2008 -0700 tracehook: release_task This moves the ptrace-related logic from release_task into tracehook.h and ptrace.h inlines. It provides clean hooks both before and after locking tasklist_lock, for future tracing logic to do more cleanup without the lock. This also changes release_task() itself in the rare "zap_leader" case to set the leader to EXIT_DEAD before iterating. This maintains the invariant that release_task() only ever handles a task in EXIT_DEAD. This is a common-sense invariant that is already always true except in this one arcane case of zombie leader whose parent ignores SIGCHLD. This change is harmless and only costs one store in this one rare case. It keeps the expected state more consisently sane, which is nicer when debugging weirdness in release_task(). It also lets some future code in the tracehook entry points rely on this invariant for bookkeeping. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit daded34be96b1975ff8539ff62ad8b158ce7d842 Author: Roland McGrath Date: Fri Jul 25 19:45:47 2008 -0700 tracehook: vfork-done This moves the PTRACE_EVENT_VFORK_DONE tracing into a tracehook.h inline, tracehook_report_vfork_done(). The change has no effect, just clean-up. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09a05394fe2448a4139b014936330af23fa7ec83 Author: Roland McGrath Date: Fri Jul 25 19:45:47 2008 -0700 tracehook: clone This moves all the ptrace initialization and tracing logic for task creation into tracehook.h and ptrace.h inlines. It reorganizes the code slightly, but should not change any behavior. There are four tracehook entry points, at each important stage of task creation. This keeps the interface from the core fork.c code fairly clean, while supporting the complex setup required for ptrace or something like it. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30199f5a46aee204bf437a4f5b0740f3efe448b7 Author: Roland McGrath Date: Fri Jul 25 19:45:46 2008 -0700 tracehook: exit This moves the PTRACE_EVENT_EXIT tracing into a tracehook.h inline, tracehook_report_exec(). The change has no effect, just clean-up. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff1188646c6870f336e910fb894eeed74f50471f Author: Roland McGrath Date: Fri Jul 25 19:45:45 2008 -0700 tracehook: unexport ptrace_notify The ptrace_notify() function should not be called by any modules. It was only ever exported to be called by binfmt exec functions. But that is no longer necessary since fs/exec.c deals with that generically now. There should be no calls to ptrace_notify() from outside the core kernel. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6341c393fcc37d58727865f1ee2f65e632e9d4f0 Author: Roland McGrath Date: Fri Jul 25 19:45:44 2008 -0700 tracehook: exec This moves all the ptrace hooks related to exec into tracehook.h inlines. This also lifts the calls for tracing out of the binfmt load_binary hooks into search_binary_handler() after it calls into the binfmt module. This change has no effect, since all the binfmt modules' load_binary functions did the call at the end on success, and now search_binary_handler() does it immediately after return if successful. We consolidate the repeated code, and binfmt modules no longer need to import ptrace_notify(). Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 88ac2921a71f788ed693bcd44731dd6bc1994640 Author: Roland McGrath Date: Fri Jul 25 19:45:43 2008 -0700 tracehook: add linux/tracehook.h This patch series introduces the "tracehook" interface layer of inlines in . There are more details in the log entry for patch 01/23 and in the header file comments inside that patch. Most of these changes move code around with little or no change, and they should not break anything or change any behavior. This sets a new standard for uniform arch support to enable clean arch-independent implementations of new debugging and tracing stuff, denoted by CONFIG_HAVE_ARCH_TRACEHOOK. Patch 20/23 adds that symbol to arch/Kconfig, with comments listing everything an arch has to do before setting "select HAVE_ARCH_TRACEHOOK". These are elaborted a bit at: http://sourceware.org/systemtap/wiki/utrace/arch/HowTo The new inlines that arch code must define or call have detailed kerneldoc comments in the generic header files that say what is required. No arch is obligated to do any work, and no arch's build should be broken by these changes. There are several steps that each arch should take so it can set HAVE_ARCH_TRACEHOOK. Most of these are simple. Providing this support will let new things people add for doing debugging and tracing of user-level threads "just work" for your arch in the future. For an arch that does not provide HAVE_ARCH_TRACEHOOK, some new options for such features will not be available for config. I have done some arch work and will submit this to the arch maintainers after the generic tracehook series settles in. For now, that work is available in my GIT repositories, and in patch and mbox-of-patches form at http://people.redhat.com/roland/utrace/2.6-current/ This paves the way for my "utrace" work, to be submitted later. But it is not innately tied to that. I hope that the tracehook series can go in soon regardless of what eventually does or doesn't go on top of it. For anyone implementing any kind of new tracing/debugging plan, or just understanding all the context of the existing ptrace implementation, having tracehook.h makes things much easier to find and understand. This patch: This adds the new kernel-internal header file . This is not yet used at all. The comments in the header introduce what the following series of patches is about. The aim is to formalize and consolidate all the places that the core kernel code and the arch code now ties into the ptrace implementation. These patches mostly don't cause any functional change. They just move the details of ptrace logic out of core code into tracehook.h inlines, where they are mostly compiled away to the same as before. All that changes is that everything is thoroughly documented and any future reworking of ptrace, or addition of something new, would not have to touch core code all over, just change the tracehook.h inlines. The new linux/ptrace.h inlines are used by the following patches in the new tracehook_*() inlines. Using these helpers for the ptrace event stops makes it simple to change or disable the old ptrace implementation of these stops conditionally later. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 267e2a9c71b8e088ac307f9549f71468e86e26c1 Author: Arjan van de Ven Date: Fri Jul 25 19:45:41 2008 -0700 Use WARN() in fs/proc/ Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. This way, the entire if() {} section can collapse into the WARN() as well. Signed-off-by: Arjan van de Ven Acked-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99fcd77d15357e8ba51005c25cc750b9c28b2688 Author: Arjan van de Ven Date: Fri Jul 25 19:45:41 2008 -0700 Use WARN() in fs/sysfs Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Also, with this, one fo the if() sections collapses entirely into the WARN(). Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c752ad9f35910ff1912b3f3ae82878178ddc432 Author: Arjan van de Ven Date: Fri Jul 25 19:45:40 2008 -0700 Use WARN() in fs/ Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5cd2b459d326a424671dcd95f038649f7bf7cb96 Author: Arjan van de Ven Date: Fri Jul 25 19:45:39 2008 -0700 Use WARN() in lib/ Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. In addition, one of the if() clauses collapes into the WARN() entirely now. Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f810a5cf28a818db96333cd23646f0227ec015b4 Author: Arjan van de Ven Date: Fri Jul 25 19:45:39 2008 -0700 Use WARN() in drivers/base/ Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Signed-off-by: Arjan van de Ven Cc: Greg KH Cc: Kay Sievers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12e0036818eed243c8ed6583ebf98261a2554e12 Author: Arjan van de Ven Date: Fri Jul 25 19:45:38 2008 -0700 Use WARN() in block/ Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Signed-off-by: Arjan van de Ven Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 261c40c1191ad8d7a2e49fa2bb5f6a84e3d44b10 Author: Arjan van de Ven Date: Fri Jul 25 19:45:37 2008 -0700 use WARN() in kernel/irq/chip.c Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Signed-off-by: Arjan van de Ven Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c8573e25f27b60b495aaa23089032f685ffd5ba Author: Arjan van de Ven Date: Fri Jul 25 19:45:37 2008 -0700 Use WARN() in mm/vmalloc.c Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b8c512f6190e313df69060bae4a161c5c044e272 Author: Arjan van de Ven Date: Fri Jul 25 19:45:36 2008 -0700 Use WARN() in kernel/irq/manage.c Replace a printk+WARN_ON() by a WARN(); this increases the chance of the string making it into the bugreport (ie: it goes inside the ---[ cut here ]--- section) Signed-off-by: Arjan van de Ven Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 51cc50685a4275c6a02653670af9f108a64e01cf Author: Alexey Dobriyan Date: Fri Jul 25 19:45:34 2008 -0700 SL*B: drop kmem cache argument from constructor Kmem cache passed to constructor is only needed for constructors that are themselves multiplexeres. Nobody uses this "feature", nor does anybody uses passed kmem cache in non-trivial way, so pass only pointer to object. Non-trivial places are: arch/powerpc/mm/init_64.c arch/powerpc/mm/hugetlbpage.c This is flag day, yes. Signed-off-by: Alexey Dobriyan Acked-by: Pekka Enberg Acked-by: Christoph Lameter Cc: Jon Tollefson Cc: Nick Piggin Cc: Matt Mackall [akpm@linux-foundation.org: fix arch/powerpc/mm/hugetlbpage.c] [akpm@linux-foundation.org: fix mm/slab.c] [akpm@linux-foundation.org: fix ubifs] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d91958815d214ea365b98cbff6215383897edcb6 Author: Matt LaPlante Date: Fri Jul 25 19:45:33 2008 -0700 Documentation cleanup: trivial misspelling, punctuation, and grammar corrections. Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19fd6231279be3c3bdd02ed99f9b0eb195978064 Author: Nick Piggin Date: Fri Jul 25 19:45:32 2008 -0700 mm: spinlock tree_lock mapping->tree_lock has no read lockers. convert the lock from an rwlock to a spinlock. Signed-off-by: Nick Piggin Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Hugh Dickins Cc: "Paul E. McKenney" Reviewed-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a60637c85893e7191faaafa6a72e197c24386727 Author: Nick Piggin Date: Fri Jul 25 19:45:31 2008 -0700 mm: lockless pagecache Combine page_cache_get_speculative with lockless radix tree lookups to introduce lockless page cache lookups (ie. no mapping->tree_lock on the read-side). The only atomicity changes this introduces is that the gang pagecache lookup functions now behave as if they are implemented with multiple find_get_page calls, rather than operating on a snapshot of the pages. In practice, this atomicity guarantee is not used anyway, and it is to replace individual lookups, so these semantics are natural. Signed-off-by: Nick Piggin Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Hugh Dickins Cc: "Paul E. McKenney" Reviewed-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e286781d5f2e9c846e012a39653a166e9d31777d Author: Nick Piggin Date: Fri Jul 25 19:45:30 2008 -0700 mm: speculative page references If we can be sure that elevating the page_count on a pagecache page will pin it, we can speculatively run this operation, and subsequently check to see if we hit the right page rather than relying on holding a lock or otherwise pinning a reference to the page. This can be done if get_page/put_page behaves consistently throughout the whole tree (ie. if we "get" the page after it has been used for something else, we must be able to free it with a put_page). Actually, there is a period where the count behaves differently: when the page is free or if it is a constituent page of a compound page. We need an atomic_inc_not_zero operation to ensure we don't try to grab the page in either case. This patch introduces the core locking protocol to the pagecache (ie. adds page_cache_get_speculative, and tweaks some update-side code to make it work). Thanks to Hugh for pointing out an improvement to the algorithm setting page_count to zero when we have control of all references, in order to hold off speculative getters. [kamezawa.hiroyu@jp.fujitsu.com: fix migration_entry_wait()] [hugh@veritas.com: fix add_to_page_cache] [akpm@linux-foundation.org: repair a comment] Signed-off-by: Nick Piggin Cc: Jeff Garzik Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Hugh Dickins Cc: "Paul E. McKenney" Reviewed-by: Peter Zijlstra Signed-off-by: Daisuke Nishimura Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: KOSAKI Motohiro Signed-off-by: Hugh Dickins Acked-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47feff2c8eefe85099f87c43d3096855f0085ca0 Author: Nick Piggin Date: Fri Jul 25 19:45:29 2008 -0700 radix-tree: add gang_lookup_slot, gang_lookup_slot_tag Introduce gang_lookup_slot() and gang_lookup_slot_tag() functions, which are used by lockless pagecache. Signed-off-by: Nick Piggin Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Hugh Dickins Cc: "Paul E. McKenney" Reviewed-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30002ed2e41830ec03ec3e577ad83ac6b188f96e Author: Nick Piggin Date: Fri Jul 25 19:45:28 2008 -0700 mm: readahead scan lockless radix_tree_next_hole() is implemented as a series of radix_tree_lookup()s. So it can be called locklessly, under rcu_read_lock(). Signed-off-by: Nick Piggin Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Hugh Dickins Cc: "Paul E. McKenney" Reviewed-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 652ea695364142b2464744746beac206d050ef19 Author: Nick Piggin Date: Fri Jul 25 19:45:27 2008 -0700 x86: support 1GB hugepages with get_user_pages_lockless() Signed-off-by: Nick Piggin Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc40d73c950146725e9e768e856a416ec8949065 Author: Nick Piggin Date: Fri Jul 25 19:45:26 2008 -0700 splice: use get_user_pages_fast Use get_user_pages_fast in splice. This reverts some mmap_sem batching there, however the biggest problem with mmap_sem tends to be hold times blocking out other threads rather than cacheline bouncing. Further: on architectures that implement get_user_pages_fast without locks, mmap_sem can be avoided completely anyway. Signed-off-by: Nick Piggin Cc: Dave Kleikamp Cc: Andy Whitcroft Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andi Kleen Cc: Dave Kleikamp Cc: Badari Pulavarty Cc: Zach Brown Cc: Jens Axboe Reviewed-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5dd33c494a427b1d1a3b574de5c9e511c888864 Author: Nick Piggin Date: Fri Jul 25 19:45:25 2008 -0700 dio: use get_user_pages_fast Use get_user_pages_fast in the common/generic block and fs direct IO paths. Signed-off-by: Nick Piggin Cc: Dave Kleikamp Cc: Andy Whitcroft Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andi Kleen Cc: Dave Kleikamp Cc: Badari Pulavarty Cc: Zach Brown Cc: Jens Axboe Reviewed-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8174c430e445a93016ef18f717fe570214fa38bf Author: Nick Piggin Date: Fri Jul 25 19:45:24 2008 -0700 x86: lockless get_user_pages_fast() Implement get_user_pages_fast without locking in the fastpath on x86. Do an optimistic lockless pagetable walk, without taking mmap_sem or any page table locks or even mmap_sem. Page table existence is guaranteed by turning interrupts off (combined with the fact that we're always looking up the current mm, means we can do the lockless page table walk within the constraints of the TLB shootdown design). Basically we can do this lockless pagetable walk in a similar manner to the way the CPU's pagetable walker does not have to take any locks to find present ptes. This patch (combined with the subsequent ones to convert direct IO to use it) was found to give about 10% performance improvement on a 2 socket 8 core Intel Xeon system running an OLTP workload on DB2 v9.5 "To test the effects of the patch, an OLTP workload was run on an IBM x3850 M2 server with 2 processors (quad-core Intel Xeon processors at 2.93 GHz) using IBM DB2 v9.5 running Linux 2.6.24rc7 kernel. Comparing runs with and without the patch resulted in an overall performance benefit of ~9.8%. Correspondingly, oprofiles showed that samples from __up_read and __down_read routines that is seen during thread contention for system resources was reduced from 2.8% down to .05%. Monitoring the /proc/vmstat output from the patched run showed that the counter for fast_gup contained a very high number while the fast_gup_slow value was zero." (fast_gup is the old name for get_user_pages_fast, fast_gup_slow is a counter we had for the number of times the slowpath was invoked). The main reason for the improvement is that DB2 has multiple threads each issuing direct-IO. Direct-IO uses get_user_pages, and thus the threads contend the mmap_sem cacheline, and can also contend on page table locks. I would anticipate larger performance gains on larger systems, however I think DB2 uses an adaptive mix of threads and processes, so it could be that thread contention remains pretty constant as machine size increases. In which case, we stuck with "only" a 10% gain. The downside of using get_user_pages_fast is that if there is not a pte with the correct permissions for the access, we end up falling back to get_user_pages and so the get_user_pages_fast is a bit of extra work. However this should not be the common case in most performance critical code. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: Kconfig fix] [akpm@linux-foundation.org: Makefile fix/cleanup] [akpm@linux-foundation.org: warning fix] Signed-off-by: Nick Piggin Cc: Dave Kleikamp Cc: Andy Whitcroft Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andi Kleen Cc: Dave Kleikamp Cc: Badari Pulavarty Cc: Zach Brown Cc: Jens Axboe Reviewed-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 21cc199baa815d7b3f1ace4be20b9558cbddc00f Author: Nick Piggin Date: Fri Jul 25 19:45:22 2008 -0700 mm: introduce get_user_pages_fast Introduce a new get_user_pages_fast mm API, which is basically a get_user_pages with a less general API (but still tends to be suited to the common case): - task and mm are always current and current->mm - force is always 0 - pages is always non-NULL - don't pass back vmas This restricted API can be implemented in a much more scalable way on many architectures when the ptes are present, by walking the page tables locklessly (no mmap_sem or page table locks). When the ptes are not populated, get_user_pages_fast() could be slower. This is implemented locklessly on x86, and used in some key direct IO call sites, in later patches, which provides nearly 10% performance improvement on a threaded database workload. Lots of other code could use this too, depending on use cases (eg. grep drivers/). And it might inspire some new and clever ways to use it. [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Nick Piggin Cc: Dave Kleikamp Cc: Andy Whitcroft Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andi Kleen Cc: Dave Kleikamp Cc: Badari Pulavarty Cc: Zach Brown Cc: Jens Axboe Reviewed-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a0a8f5364a5ad248aec6cb705e0092ff563edc2f Author: Nick Piggin Date: Fri Jul 25 19:45:20 2008 -0700 x86: implement pte_special Implement the pte_special bit for x86. This is required to support lockless get_user_pages, because we need to know whether or not we can refcount a particular page given only its pte (and no vma). [hugh@veritas.com: fix a BUG] Signed-off-by: Nick Piggin Cc: Dave Kleikamp Cc: Andy Whitcroft Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andi Kleen Cc: Dave Kleikamp Cc: Badari Pulavarty Cc: Zach Brown Cc: Jens Axboe Reviewed-by: Peter Zijlstra Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2682497245e7d22160ae63032c378745a7f2cfe5 Author: Harvey Harrison Date: Fri Jul 25 19:45:20 2008 -0700 mn10300: use the common ascii hex helpers Signed-off-by: Harvey Harrison Acked-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19caeed6339aec02901e2f4c49d8e1d3d6090559 Author: Harvey Harrison Date: Fri Jul 25 19:45:19 2008 -0700 frv: use the common ascii hex helpers Signed-off-by: Harvey Harrison Acked-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 42a9a58361d3b65f4a7c2ad280cc1ec9b657e7d2 Author: Harvey Harrison Date: Fri Jul 25 19:45:18 2008 -0700 cris: use the common ascii hex helpers Signed-off-by: Harvey Harrison Cc: Mikael Starvik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ad122d901977890de554fdd3ff65474efc1a9bf Author: Bob Copeland Date: Fri Jul 25 19:45:18 2008 -0700 omfs: add MAINTAINERS entry Add the MAINTAINERS entry for OMFS. Signed-off-by: Bob Copeland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63ca8ce2a2641f9cb5f0add33ced4591681d1cd7 Author: Bob Copeland Date: Fri Jul 25 19:45:17 2008 -0700 omfs: update kbuild to include OMFS Adds OMFS to the fs Kconfig and Makefile Signed-off-by: Bob Copeland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36cc410a6799a205bfc6ccc38abd9d52f2afba64 Author: Bob Copeland Date: Fri Jul 25 19:45:17 2008 -0700 omfs: add bitmap routines Add block allocation and block bitmap management routines for OMFS. Signed-off-by: Bob Copeland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f09e98768c17287df076580c4cc72ac358312c6 Author: Bob Copeland Date: Fri Jul 25 19:45:16 2008 -0700 omfs: add file routines Add functions for reading and manipulating the storage of file data in the extent-based OMFS. Signed-off-by: Bob Copeland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3ab7155ea21aadc8a4d5687e91b3d876973185e Author: Bob Copeland Date: Fri Jul 25 19:45:16 2008 -0700 omfs: add directory routines Add lookup and directory management routines for OMFS. The filesystem uses hashing based on the filename and stores collisions, unordered, in siblings of files' inode structures. To support telldir, the current position in the hash table is encoded in fpos. Signed-off-by: Bob Copeland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 555e3775ced1d05203934fc6529bbf0560dd8733 Author: Bob Copeland Date: Fri Jul 25 19:45:15 2008 -0700 omfs: add inode routines Add basic superblock and inode handling routines for OMFS Signed-off-by: Bob Copeland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1b002d7b173ae7cc15ed90d3c07f6d106babc510 Author: Bob Copeland Date: Fri Jul 25 19:45:15 2008 -0700 omfs: define filesystem structures Add header files containing OMFS on-disk and memory structures. Signed-off-by: Bob Copeland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a14e4b572b0ee5c6dbe4aceb83d00b2c969324e9 Author: Bob Copeland Date: Fri Jul 25 19:45:14 2008 -0700 omfs: add filesystem documentation These patches add the Optimized MPEG Filesystem, a proprietary filesystem used by the embedded devices Rio Karma and ReplayTV, which are no longer manufactured. This filesystem module enables people to access files on these devices. This patch: OMFS is a proprietary filesystem created for the ReplayTV and also used by the Rio Karma. It uses hash tables with unordered, unbounded lists in each bucket for directories, extents for data blocks, 64-bit addressing for blocks, with up to 8K blocks (only 2K of a given block is ever used for metadata, so the FS still works with 4K pages). Document the filesystem usage and structures. Signed-off-by: Bob Copeland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 080ccd4573607a930367c2128fc709814b2ade5d Author: Huang Weiyi Date: Fri Jul 25 19:45:13 2008 -0700 include/linux/aio.h: removed duplicated include Removed duplicated include in include/linux/aio.h Signed-off-by: Huang Weiyi Signed-off-by: Benjamin LaHaise Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 20d8b67c06fa5e74f44e80b0a0fd68c8327f7c6a Author: Eduard - Gabriel Munteanu Date: Fri Jul 25 19:45:12 2008 -0700 relay: add buffer-only channels; useful for early logging Allows one to create and use a channel with no associated files. Files can be initialized later. This is useful in scenarios such as logging in early code, before VFS is up. Therefore, such channels can be created and used as soon as kmem_cache_init() completed. This is needed by kmemtrace to do tracing in early kernel code. [kosaki.motohiro@jp.fujitsu.com: build fix] Signed-off-by: Eduard - Gabriel Munteanu Cc: Tom Zanussi Signed-off-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7babe8db99d305340cf4828ce1f5a1481d5622ef Author: Eduard - Gabriel Munteanu Date: Fri Jul 25 19:45:11 2008 -0700 Full conversion to early_initcall() interface, remove old interface A previous patch added the early_initcall(), to allow a cleaner hooking of pre-SMP initcalls. Now we remove the older interface, converting all existing users to the new one. [akpm@linux-foundation.org: cleanups] [akpm@linux-foundation.org: build fix] [kosaki.motohiro@jp.fujitsu.com: warning fix] [kosaki.motohiro@jp.fujitsu.com: warning fix] Signed-off-by: Eduard - Gabriel Munteanu Cc: Tom Zanussi Signed-off-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c2147a5092cfe13dbf3210e54e8a622015edeecc Author: Eduard - Gabriel Munteanu Date: Fri Jul 25 19:45:11 2008 -0700 Better interface for hooking early initcalls Added early initcall (pre-SMP) support, using an identical interface to that of regular initcalls. Functions called from do_pre_smp_initcalls() could be converted to use this cleaner interface. This is required by CPU hotplug, because early users have to register notifiers before going SMP. One such CPU hotplug user is the relay interface with buffer-only channels, which needs to register such a notifier, to be usable in early code. This in turn is used by kmemtrace. Signed-off-by: Eduard - Gabriel Munteanu Cc: Tom Zanussi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89081d17f7bb81d89fa1aa9b70f821c5cf4d39e9 Author: Huang Ying Date: Fri Jul 25 19:45:10 2008 -0700 kexec jump: save/restore device state This patch implements devices state save/restore before after kexec. This patch together with features in kexec_jump patch can be used for following: - A simple hibernation implementation without ACPI support. You can kexec a hibernating kernel, save the memory image of original system and shutdown the system. When resuming, you restore the memory image of original system via ordinary kexec load then jump back. - Kernel/system debug through making system snapshot. You can make system snapshot, jump back, do some thing and make another system snapshot. - Cooperative multi-kernel/system. With kexec jump, you can switch between several kernels/systems quickly without boot process except the first time. This appears like swap a whole kernel/system out/in. - A general method to call program in physical mode (paging turning off). This can be used to invoke BIOS code under Linux. The following user-space tools can be used with kexec jump: - kexec-tools needs to be patched to support kexec jump. The patches and the precompiled kexec can be download from the following URL: source: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-src_git_kh10.tar.bz2 patches: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-patches_git_kh10.tar.bz2 binary: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec_git_kh10 - makedumpfile with patches are used as memory image saving tool, it can exclude free pages from original kernel memory image file. The patches and the precompiled makedumpfile can be download from the following URL: source: http://khibernation.sourceforge.net/download/release_v10/makedumpfile/makedumpfile-src_cvs_kh10.tar.bz2 patches: http://khibernation.sourceforge.net/download/release_v10/makedumpfile/makedumpfile-patches_cvs_kh10.tar.bz2 binary: http://khibernation.sourceforge.net/download/release_v10/makedumpfile/makedumpfile_cvs_kh10 - An initramfs image can be used as the root file system of kexeced kernel. An initramfs image built with "BuildRoot" can be downloaded from the following URL: initramfs image: http://khibernation.sourceforge.net/download/release_v10/initramfs/rootfs_cvs_kh10.gz All user space tools above are included in the initramfs image. Usage example of simple hibernation: 1. Compile and install patched kernel with following options selected: CONFIG_X86_32=y CONFIG_RELOCATABLE=y CONFIG_KEXEC=y CONFIG_CRASH_DUMP=y CONFIG_PM=y CONFIG_HIBERNATION=y CONFIG_KEXEC_JUMP=y 2. Build an initramfs image contains kexec-tool and makedumpfile, or download the pre-built initramfs image, called rootfs.gz in following text. 3. Prepare a partition to save memory image of original kernel, called hibernating partition in following text. 4. Boot kernel compiled in step 1 (kernel A). 5. In the kernel A, load kernel compiled in step 1 (kernel B) with /sbin/kexec. The shell command line can be as follow: /sbin/kexec --load-preserve-context /boot/bzImage --mem-min=0x100000 --mem-max=0xffffff --initrd=rootfs.gz 6. Boot the kernel B with following shell command line: /sbin/kexec -e 7. The kernel B will boot as normal kexec. In kernel B the memory image of kernel A can be saved into hibernating partition as follow: jump_back_entry=`cat /proc/cmdline | tr ' ' '\n' | grep kexec_jump_back_entry | cut -d '='` echo $jump_back_entry > kexec_jump_back_entry cp /proc/vmcore dump.elf Then you can shutdown the machine as normal. 8. Boot kernel compiled in step 1 (kernel C). Use the rootfs.gz as root file system. 9. In kernel C, load the memory image of kernel A as follow: /sbin/kexec -l --args-none --entry=`cat kexec_jump_back_entry` dump.elf 10. Jump back to the kernel A as follow: /sbin/kexec -e Then, kernel A is resumed. Implementation point: To support jumping between two kernels, before jumping to (executing) the new kernel and jumping back to the original kernel, the devices are put into quiescent state, and the state of devices and CPU is saved. After jumping back from kexeced kernel and jumping to the new kernel, the state of devices and CPU are restored accordingly. The devices/CPU state save/restore code of software suspend is called to implement corresponding function. Known issues: - Because the segment number supported by sys_kexec_load is limited, hibernation image with many segments may not be load. This is planned to be eliminated by adding a new flag to sys_kexec_load to make a image can be loaded with multiple sys_kexec_load invoking. Now, only the i386 architecture is supported. Signed-off-by: Huang Ying Acked-by: Vivek Goyal Cc: "Eric W. Biederman" Cc: Pavel Machek Cc: Nigel Cunningham Cc: "Rafael J. Wysocki" Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3ab83521378268044a448113c6aa9a9e245f4d2f Author: Huang Ying Date: Fri Jul 25 19:45:07 2008 -0700 kexec jump This patch provides an enhancement to kexec/kdump. It implements the following features: - Backup/restore memory used by the original kernel before/after kexec. - Save/restore CPU state before/after kexec. The features of this patch can be used as a general method to call program in physical mode (paging turning off). This can be used to call BIOS code under Linux. kexec-tools needs to be patched to support kexec jump. The patches and the precompiled kexec can be download from the following URL: source: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-src_git_kh10.tar.bz2 patches: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-patches_git_kh10.tar.bz2 binary: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec_git_kh10 Usage example of calling some physical mode code and return: 1. Compile and install patched kernel with following options selected: CONFIG_X86_32=y CONFIG_KEXEC=y CONFIG_PM=y CONFIG_KEXEC_JUMP=y 2. Build patched kexec-tool or download the pre-built one. 3. Build some physical mode executable named such as "phy_mode" 4. Boot kernel compiled in step 1. 5. Load physical mode executable with /sbin/kexec. The shell command line can be as follow: /sbin/kexec --load-preserve-context --args-none phy_mode 6. Call physical mode executable with following shell command line: /sbin/kexec -e Implementation point: To support jumping without reserving memory. One shadow backup page (source page) is allocated for each page used by kexeced code image (destination page). When do kexec_load, the image of kexeced code is loaded into source pages, and before executing, the destination pages and the source pages are swapped, so the contents of destination pages are backupped. Before jumping to the kexeced code image and after jumping back to the original kernel, the destination pages and the source pages are swapped too. C ABI (calling convention) is used as communication protocol between kernel and called code. A flag named KEXEC_PRESERVE_CONTEXT for sys_kexec_load is added to indicate that the loaded kernel image is used for jumping back. Now, only the i386 architecture is supported. Signed-off-by: Huang Ying Acked-by: Vivek Goyal Cc: "Eric W. Biederman" Cc: Pavel Machek Cc: Nigel Cunningham Cc: "Rafael J. Wysocki" Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7fccf0326536c1b245b98740d489abb9aab69a12 Author: WANG Cong Date: Fri Jul 25 19:45:02 2008 -0700 kernel/kexec.c: make 'kimage_terminate' void Since kimage_terminate() always returns 0, make it void. Signed-off-by: WANG Cong Signed-off-by: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1d82698029b92a88f5500b99f66514b6dee2bc3 Author: Alex Dubov Date: Fri Jul 25 19:45:02 2008 -0700 memstick: use fully asynchronous request processing Instead of using a separate thread to pump requests from block layer queue to memstick, do so inline, utilizing the callback design of the memstick. [akpm@linux-foundation.org: fix warnings] Signed-off-by: Alex Dubov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17017d8d2c005734d7088d8281ce2daab8fcb097 Author: Alex Dubov Date: Fri Jul 25 19:45:01 2008 -0700 memstick: add "start" and "stop" methods to memstick device In some cases it may be desirable to ensure that associated driver is not going to access the media in some period of time. "start" and "stop" methods are provided therefore to allow it. Signed-off-by: Alex Dubov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b77899985bdfd85a8e5a6e485033a9b4713d2471 Author: Alex Dubov Date: Fri Jul 25 19:45:00 2008 -0700 memstick: allow "set_param" method to return an error code Some controllers (Jmicron, for instance) can report temporal failure condition during power-on. It is desirable to account for this using a return value of "set_param" device method. The return value can also be handy to distinguish between supported and unsupported device parameters in run time. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Alex Dubov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0147600172b4a5d261165d1aa5ef818d84da1557 Author: Michael Halcrow Date: Fri Jul 25 19:45:00 2008 -0700 tpm: Use correct data types for sizes in tpm_write() and tpm_read() Use the correct data types for the size parameters in tpm_write() and tpm_read(). Note that rw_verify_area() makes sure that this bug cannot be exploited to produce a buffer overrun. Signed-off-by: Michael Halcrow Cc: Marcel Selhorst Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec288bd37e1925f513db40871bc46115cf7fb733 Author: Marcin Obara Date: Fri Jul 25 19:44:59 2008 -0700 tpm: increase size of internal TPM response buffers This patch increases size of driver internal response buffers. Some TPM responses defined in TCG TPM Specification Version 1.2 Revision 103 have increased size and do not fit previously defined buffers. Some TPM responses do not have fixed size, so bigger response buffers have to be allocated. 200B buffers should be enough. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Marcin Obara Cc: Marcel Selhorst Cc: Kylene Jo Hall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3bd60464e3224820bc413c45ea2cc371edc63e9d Author: Adrian Bunk Date: Fri Jul 25 19:44:58 2008 -0700 tpm_bios.c: make 2 structs static This patch makes two needlessly global structs static. Signed-off-by: Adrian Bunk Acked-by: Marcel Selhorst Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 061991ec6edceda48d60f7a53e17b8d3416266ae Author: LE DISEZ Erwan Date: Fri Jul 25 19:44:56 2008 -0700 tpm: add support for Broadcom TPM TIS device HID Signed-off-by: Rajiv Andrade Cc: Marcel Selhorst Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit adbd321a17ccdd26752b57e68ab0a97a4aebc299 Author: Bernhard Walle Date: Fri Jul 25 19:44:56 2008 -0700 parport_pc: add base_hi BAR for oxsemi_840 Use the 2nd BAR for the oxsemi_840 chip as BAR for base_hi. Tested with: Parallel controller [0701]: Oxford Semiconductor Ltd VScom 011H-EP1 1 port parallel adaptor [1415:8403] (prog-if 03 [IEEE1284]) This patch is needed to make 'TRISTATE' work with that adaptor. Signed-off-by: Bernhard Walle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d99a0344aefbfe991147472d46a6ee1c1a0043de Author: Andre Haupt Date: Fri Jul 25 19:44:55 2008 -0700 parport: remove superfluous local variable Signed-off-by: Andre Haupt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 929dfb24fbcd60e2544b2de7bfb4a68da4dfc747 Author: Adrian Bunk Date: Fri Jul 25 19:44:54 2008 -0700 parport/share.c: proper externs This patch adds proper externs for parport_default_timeslice and parport_default_spintime in include/linux/parport.h Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f165e4cf2af042af7d2440d688299c0d2a48b1f Author: Dmitri Vorobiev Date: Fri Jul 25 19:44:54 2008 -0700 bfs: kill BKL Replace the BKL-based locking scheme used in the bfs driver by a private filesystem-wide mutex. Signed-off-by: Dmitri Vorobiev Cc: Tigran Aivazian Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75b25b4cabb7ce956c36442bf8225659b1864866 Author: Dmitri Vorobiev Date: Fri Jul 25 19:44:52 2008 -0700 bfs: assorted cleanups This patch makes the following cleanups: o removing an unused variable from bfs_fill_super(); o removing unneeded blank spaces from pointer definitions. Signed-off-by: Dmitri Vorobiev Cc: Tigran Aivazian Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7d135a5d50a08bbc53b189d79d8bdb03136f5303 Author: Matthias Kaehlcke Date: Fri Jul 25 19:44:51 2008 -0700 affs: convert s_bmlock into a mutex The semaphore s_bmlock is used as a mutex. Convert it to the mutex API. Signed-off-by: Matthias Kaehlcke Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1956a96de488feb05e95c08c9d5e80f63a4be2b1 Author: Alexis Bruemmer Date: Fri Jul 25 19:44:51 2008 -0700 x86 calgary: fix handling of devices that aren't behind the Calgary The calgary code can give drivers addresses above 4GB which is very bad for hardware that is only 32bit DMA addressable. With this patch, the calgary code sets the global dma_ops to swiotlb or nommu properly, and the dma_ops of devices behind the Calgary/CalIOC2 to calgary_dma_ops. So the calgary code can handle devices safely that aren't behind the Calgary/CalIOC2. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Alexis Bruemmer Signed-off-by: FUJITA Tomonori Cc: Muli Ben-Yehuda Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 Author: FUJITA Tomonori Date: Fri Jul 25 19:44:49 2008 -0700 dma-mapping: add the device argument to dma_mapping_error() Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER architecture does: This enables us to cleanly fix the Calgary IOMMU issue that some devices are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423). I think that per-device dma_mapping_ops support would be also helpful for KVM people to support PCI passthrough but Andi thinks that this makes it difficult to support the PCI passthrough (see the above thread). So I CC'ed this to KVM camp. Comments are appreciated. A pointer to dma_mapping_ops to struct dev_archdata is added. If the pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's NULL, the system-wide dma_ops pointer is used as before. If it's useful for KVM people, I plan to implement a mechanism to register a hook called when a new pci (or dma capable) device is created (it works with hot plugging). It enables IOMMUs to set up an appropriate dma_mapping_ops per device. The major obstacle is that dma_mapping_error doesn't take a pointer to the device unlike other DMA operations. So x86 can't have dma_mapping_ops per device. Note all the POWER IOMMUs use the same dma_mapping_error function so this is not a problem for POWER but x86 IOMMUs use different dma_mapping_error functions. The first patch adds the device argument to dma_mapping_error. The patch is trivial but large since it touches lots of drivers and dma-mapping.h in all the architecture. This patch: dma_mapping_error() doesn't take a pointer to the device unlike other DMA operations. So we can't have dma_mapping_ops per device. Note that POWER already has dma_mapping_ops per device but all the POWER IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device argument. [akpm@linux-foundation.org: fix sge] [akpm@linux-foundation.org: fix svc_rdma] [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: fix bnx2x] [akpm@linux-foundation.org: fix s2io] [akpm@linux-foundation.org: fix pasemi_mac] [akpm@linux-foundation.org: fix sdhci] [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: fix sparc] [akpm@linux-foundation.org: fix ibmvscsi] Signed-off-by: FUJITA Tomonori Cc: Muli Ben-Yehuda Cc: Andi Kleen Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Avi Kivity Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c485b465a031b6f9b9a51300e0ee1f86efc6db87 Author: David Howells Date: Fri Jul 25 19:44:47 2008 -0700 pnp: fix the fcpnp_driver declaration to only exist if CONFIG_PNP=y Fix the fcpnp_driver declaration to only exist if CONFIG_PNP=y as it's only accessed in that case. The PNP=n variant was added by 30d55e71a81b1f5a8136f191dc9f4c21f18e77e6 ("hisax: depend on CONFIG_PNP, not __ISAPNP__") Fixes an unused variable warning. Signed-off-by: David Howells Acked-by: Bjorn Helgaas Cc: Karsten Keil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 999ed65ad12e374d7445fbc13f5a1d146ae4b0da Author: Rene Herman Date: Fri Jul 25 19:44:47 2008 -0700 pnp: have quirk_system_pci_resources() include io resources quirk_system_pci_resources() disables a PnP mem resource that overlaps a PCI BAR so as to not keep the PCI driver from claiming the resource. Have it do the same for io resources. Here, ACPI claims ports that overlap with my soundcard causing the soundcard driver to fail to load. It's unknown why my ACPI BIOS claims those ports; it did not use to but this is not a (kernel) regression. Some odd BIOS reconfig triggered by temporarily removing the card seems to have brought this on. Signed-off-by: Rene Herman Acked-by: Bjorn Helgaas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 00412be1d7bdf451653c7dafeb09f4f83398d756 Author: Rene Herman Date: Fri Jul 25 19:44:45 2008 -0700 isa: set 24-bit dma_mask for ISA devices dma_alloc_coherent() on x86 currently takes a passed in NULL device pointer to mean that it should allocate an ISA compatible (24-bit) buffer which is a bit of a hack. The ALSA ISA drivers are the main consumers of this but have a struct device in fact readily available. For the legacy drivers, this sets the device dma_mask in preparation for using the actual device with the DMA API so as to eventually not need the NULL hack in dma_alloc_coherent(). This does not fix a current bug -- 2.6.26-rc1 stumbled over the NULL hack in dma_alloc_coherent() but this has already been fixed in commit 4a367f3a9dbf2e7ffcee4702203479809236ee6e by Takashi Iwai. Signed-off-by: Rene Herman Cc: Bjorn Helgaas Acked-by: Takashi Iwai Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e86b19ce64a25d39bb0e10e0e695213fc5993dfb Author: Rene Herman Date: Fri Jul 25 19:44:42 2008 -0700 pnp: set the pnp_card dma_mask for use by ISAPnP cards dma_alloc_coherent() on x86 currently takes a passed in NULL device pointer to mean that it should allocate an ISA compatible (24-bit) buffer which is a bit of a hack. The ALSA ISA drivers are the main consumers of this but have a struct device in fact readily available. For the PnP drivers, the specific pnp_dev->dev device pointer is not always available at the right time so for now we want to pass the pnp_card->dev instead which is always available. Set its dma_mask in preparation for doing so. This does not fix a current bug -- 2.6.26-rc1 stumbled over the NULL hack in dma_alloc_coherent() but this has already been fixed in commit 4a367f3a9dbf2e7ffcee4702203479809236ee6e by Takashi Iwai. Signed-off-by: Rene Herman Acked-by: Bjorn Helgaas Acked-by: Takashi Iwai Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c491b2ffae3fad5e6e3cb2320b46bb8ea8729d49 Author: Roel Kluin <12o3l@tiscali.nl> Date: Fri Jul 25 19:44:41 2008 -0700 asic3: platform_get_irq() may return signed unnoticed asic->irq_nr is unsigned. platform_get_irq() may return signed unnoticed Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Cc: Joe Perches Acked-by: Samuel Ortiz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3c6ba986ab4527b6dfacf9f3b9e40f72466a8b2 Author: Kentaro Makita Date: Fri Jul 25 19:44:40 2008 -0700 vfs: add cond_resched_lock while scanning dentry LRU lists Add cond_resched_lock(&dcache_lock) while scanning LRU lists on superblocks in __shrink_dcache_sb() Signed-off-by: Kentaro Makita Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a76eef9573c93f8f324ebacfd090a3e319a64d59 Author: FUJITA Tomonori Date: Fri Jul 25 19:44:39 2008 -0700 block/blk-map.c: use the new object_is_on_stack() helper Signed-off-by: FUJITA Tomonori Cc: Bartlomiej Zolnierkiewicz Cc: Thomas Bogendoerfer Cc: Tejun Heo Cc: Jens Axboe Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a2e2e3577c3ef2b5dbb866e97e612aae4adfa32f Author: David Brownell Date: Fri Jul 25 19:44:38 2008 -0700 pm selftest: rtc paranoia Cope with a quirk of some RTCs (notably ACPI ones) which aren't guaranteed to implement oneshot behavior when they woke the system from sleeep: forcibly disable the alarm, just in case. Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 44ccac13c7f4728cf2992d49384671a176db74dd Author: Adrian Bunk Date: Fri Jul 25 19:44:38 2008 -0700 include/video/atmel_lcdc.h must #include This patch fixes the following compile error caused by commit d22579b837358cbef12ccca5adaf7e93ae09ab7a ("atmel_lcdfb: FIFO underflow management"): In file included from arch/avr32/boards/atstk1000/atstk1004.c:21: include/video/atmel_lcdc.h:40: error: field 'task' has incomplete type Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8a21346058ad946134b6ddfeb5de975c3cfcf5da Author: Nishanth Aravamudan Date: Fri Jul 25 19:44:37 2008 -0700 hugetlb: fix CONFIG_SYSCTL=n build Fixes a build failure reported by Alan Cox: mm/hugetlb.c: In function `hugetlb_acct_memory': mm/hugetlb.c:1507: error: implicit declaration of function `cpuset_mems_nr' Also reverts Ingo's commit e44d1b2998d62a1f2f4d7eb17b56ba396535509f Author: Ingo Molnar Date: Fri Jul 25 12:57:41 2008 +0200 mm/hugetlb.c: fix build failure with !CONFIG_SYSCTL which fixed the build error but added some unused-static-function warnings. Signed-off-by: Nishanth Aravamudan Cc: Alan Cox Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 16d69265b930f7e2fa9eea381715696f780718f4 Author: Andrew Morton Date: Fri Jul 25 19:44:36 2008 -0700 uninline arch_pick_mmap_layout() Fix this, on avr32: include/linux/utsname.h:35, from init/main.c:20: include/linux/sched.h: In function 'arch_pick_mmap_layout': include/linux/sched.h:2149: error: implicit declaration of function 'PAGE_ALIGN' Reported-by: Adrian Bunk Cc: Haavard Skinnemoen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c7ad106e779549792deb307242dece6f3499bb9 Author: Andrew Morton Date: Fri Jul 25 19:44:35 2008 -0700 drivers/mmc/host/sdhci.h needs scatterlist.h alpha: drivers/mmc/host/sdhci.h:242: error: field 'sg_miter' has incomplete type Cc: Pierre Ossman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a61ec387c9092dfc91a5959145d36835a72fc4c Author: Joerg Roedel Date: Fri Jul 25 13:07:50 2008 +0200 x86, AMD IOMMU: include amd_iommu_last_bdf in device initialization All the values read while searching for amd_iommu_last_bdf are defined as inclusive. Let the code handle this value as such. Found by Wei Wang. Thanks Wei. Signed-off-by: Joerg Roedel Cc: iommu@lists.linux-foundation.org Cc: bhavna.sarathy@amd.com Cc: robert.richter@amd.com Cc: Wei Wang Signed-off-by: Ingo Molnar commit 1fe371044b21b226b96a9dd959e971b50b28c78e Author: Ingo Molnar Date: Sat Jul 26 15:09:47 2008 +0200 ftrace: fix modular build fix: ERROR: "start_critical_timings" [drivers/acpi/processor.ko] undefined! ERROR: "stop_critical_timings" [drivers/acpi/processor.ko] undefined! Signed-off-by: Ingo Molnar commit 1ca9fda4b2f3413e4bc748b983f5585629ca0560 Author: Chris McDermott Date: Thu Jul 24 19:06:09 2008 -0700 x86: fix IBM Summit based systems' phys_cpu_present_map on 32-bit kernels x86 kernels on IBM Summit based systems will only online 1 CPU because the phys_cpu_present_map is not set up correctly. Patch below applied to 2.6.26-git10. Signed-off-by: Chris McDermott Tested-by: Tim Pepper Signed-off-by: Ingo Molnar commit 071375bc76ee86e58592f4682030c81d410ddfd9 Author: Ingo Molnar Date: Sat Jul 26 14:52:26 2008 +0200 x86, RDC321x: remove gpio.h complications Remove the include/asm-x86/gpio.h specials, just use the generic version. Signed-off-by: Ingo Molnar commit dcf309974555d17019c6a8e1a425238f17990b71 Author: Steven Rostedt Date: Fri Jul 25 18:00:42 2008 -0400 ftrace: disable tracing on acpi idle calls The acpi idle waits calls local_irq_save and then uses mwait to go into idle. The tracer gets reenabled at local_irq_save but does not detect that the idle allows for wake ups. This patch adds code to disable the tracing when acpi puts the CPU to idle. Signed-off-by: Steven Rostedt Cc: Peter Zijlstra Signed-off-by: Ingo Molnar commit 1f972768a1df1518f45adb6b8ffbf04fa1c99737 Author: Ingo Molnar Date: Sat Jul 26 13:52:50 2008 +0200 x86, RDC321x: add to mach-default first step to add RDC321x support to the default PC architecture. Signed-off-by: Ingo Molnar commit 2d2009806dd843f3adc0cbbb5d2204980f28111a Author: Robin Getz Date: Sat Jul 26 19:41:40 2008 +0800 Blackfin arch: If we double fault, rather than hang forever, reset Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit 9de3a0b6979a4839d67ca840e386ea06acaabe39 Author: Robin Getz Date: Sat Jul 26 19:39:19 2008 +0800 Blackfin arch: When icache is off, make sure people know it Signed-off-by: Robin Getz Signed-off-by: Bryan Wu commit 0d1cdd7ab6e0e7ccaf9f3b1d2afa0ddeead23ccc Author: Sonic Zhang Date: Sat Jul 26 18:54:38 2008 +0800 Blackfin arch: Fix bug - skip single step in high priority interrupt handler instead of disabling all interrupts in single step debugging. Skip single step if event priority of current instruction is higher than that of the first instruction, from which gdb starts single step. Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu commit 3a2521fa75359450f5ec7e6b76847f933b7ee680 Author: Mike Frysinger Date: Sat Jul 26 18:52:56 2008 +0800 Blackfin arch: cache the values of vco/sclk/cclk as the overhead of doing so (~24 bytes) is worth avoiding the software mult/div routines Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit 377d43e7d07fc9a64eb162c6f70e6d1961604629 Author: Michael Hennerich Date: Sat Jul 26 18:28:03 2008 +0800 Blackfin arch: fix bug - IMDMA is not type struct dma_register TEMP Workaround - avoid access to PERIPHERAL_MAP Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu commit b1b154e503a0e590eb9e189586783dc8750f910e Author: Mike Frysinger Date: Sat Jul 26 18:02:05 2008 +0800 Blackfin arch: check the EXTBANKS field of the DDRCTL1 register to see if we are using both memory banks Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu commit cdec7e50a4896c5197d5575d9ca635eea6825149 Author: David S. Miller Date: Sat Jul 26 02:28:09 2008 -0700 Revert "pkt_sched: sch_sfq: dump a real number of flows" This reverts commit f867e6af94239a04ec23aeec2fcda5aa58e41db7. Based upon discussions between Jarek and Patrick McHardy this is field being set is more a config parameter than a statistic. And we should add a true statistic to provide this information if we really want it. Signed-off-by: David S. Miller commit 36ac26171afa8dbf29226199699fe955d4a0b6f6 Author: Ingo Molnar Date: Sat Jul 26 11:22:33 2008 +0200 crashdump: fix undefined reference to `elfcorehdr_addr' fix build bug introduced by 95b68dec0d5 "calgary iommu: use the first kernels TCE tables in kdump": arch/x86/kernel/built-in.o: In function `calgary_iommu_init': (.init.text+0x8399): undefined reference to `elfcorehdr_addr' arch/x86/kernel/built-in.o: In function `calgary_iommu_init': (.init.text+0x856c): undefined reference to `elfcorehdr_addr' arch/x86/kernel/built-in.o: In function `detect_calgary': (.init.text+0x8c68): undefined reference to `elfcorehdr_addr' arch/x86/kernel/built-in.o: In function `detect_calgary': (.init.text+0x8d0c): undefined reference to `elfcorehdr_addr' make elfcorehdr_addr a generally available symbol. Signed-off-by: Ingo Molnar commit 88bef5a4074e0568cf54df410f41065c06694d8a Merge: 054a3fd... 024e8ac... Author: Ingo Molnar Date: Sat Jul 26 11:26:19 2008 +0200 Merge branch 'linus' into x86/urgent commit 509e2562adfd63964aa30c1ddd9ddf4e57949351 Author: Heiko Carstens Date: Sat Jul 26 02:24:10 2008 -0700 qeth: use dev->ml_priv instead of dev->priv From: Heiko Carstens This makes qeth working again after git commit e3c50d5d25ac09efd9acbe2b2a3e365466de84ed "netdev: netdev_priv() can now be sane again.". Signed-off-by: Heiko Carstens Signed-off-by: David S. Miller commit 16df845f4566bc252f3e09db12f5c2f22cb44226 Author: Florian Westphal Date: Sat Jul 26 02:21:54 2008 -0700 syncookies: Make sure ECN is disabled ecn_ok is not initialized when a connection is established by cookies. The cookie syn-ack never sets ECN, so ecn_ok must be set to 0. Spotted using ns-3/network simulation cradle simulator and valgrind. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 054a3fd824705543322d787893de9f3755151517 Author: Wang Chen Date: Fri Jul 25 15:44:33 2008 +0800 flag parameters: fix compile error of sys_epoll_create1 GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD vmlinux arch/x86/kernel/built-in.o: In function `sys_call_table': (.rodata+0x8a4): undefined reference to `sys_epoll_create1' make: *** [vmlinux] Error 1 Signed-off-by: Wang Chen Cc: Andrew Morton Cc: Davide Libenzi Cc: Ulrich Drepper Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit ec34c702ca8b7d6f0aa54379c3b0d0ec10b8ff23 Author: Ilpo Järvinen Date: Fri Jul 25 21:45:49 2008 -0700 net: drop unused BUG_TRAP() Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller commit 547b792cac0a038b9dbf958d3c120df3740b5572 Author: Ilpo Järvinen Date: Fri Jul 25 21:43:18 2008 -0700 net: convert BUG_TRAP to generic WARN_ON Removes legacy reinvent-the-wheel type thing. The generic machinery integrates much better to automated debugging aids such as kerneloops.org (and others), and is unambiguous due to better naming. Non-intuively BUG_TRAP() is actually equal to WARN_ON() rather than BUG_ON() though some might actually be promoted to BUG_ON() but I left that to future. I could make at least one BUILD_BUG_ON conversion. Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller commit 53e5e96ec18da6f65e89f05674711e1c93d8df67 Author: Ilpo Järvinen Date: Fri Jul 25 21:40:45 2008 -0700 drivers/net: convert BUG_TRAP to generic WARN_ON Removes legacy reinvent-the-wheel type thing. The generic machinery integrates much better to automated debugging aids such as kerneloops.org (and others), and is unambiguous due to better naming. Non-intuively BUG_TRAP() is actually equal to WARN_ON() rather than BUG_ON(). Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller commit 024e8ac04453b3525448c31ef39848cf675ba6db Author: Roland McGrath Date: Fri Jul 25 20:00:10 2008 -0700 x86_64: fix ia32 AMD syscall audit fast-path The new code in commit 5cbf1565f29eb57a86a305b08836613508e294d7 has a bug in the version supporting the AMD 'syscall' instruction. It clobbers the user's %ecx register value (with the %ebp value). This change fixes it. Signed-off-by: Roland McGrath commit 1ff8419871ea757ae0298aa296bcff9b2ca48561 Merge: 8d25b36... 7d7e5a6... Author: Linus Torvalds Date: Fri Jul 25 17:40:16 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: ipsec: ipcomp - Decompress into frags if necessary ipsec: ipcomp - Merge IPComp implementations pkt_sched: Fix locking in shutdown_scheduler_queue() commit 8d25b36b77fe32c296ece83e94ca6ae4d17f3e25 Author: Adrian Bunk Date: Sat Jul 26 02:38:00 2008 +0300 MFD_TC6393XB is ARM-only Compile error on other architectures: CC drivers/mfd/tc6393xb.o /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mfd/tc6393xb.c: In function ‘tc6393xb_attach_irq’: /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mfd/tc6393xb.c:324: error: implicit declaration of function ‘set_irq_flags’ ... Reported-by: Adrian Bunk Signed-off-by: Adrian Bunk Signed-off-by: Linus Torvalds commit e89f38218ff6de09983bd8769ec0cdf6e70d9e8e Merge: 7b35fa8... fc532f8... Author: Linus Torvalds Date: Fri Jul 25 17:34:00 2008 -0700 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Fix boot problem due to AT_BASE_PLATFORM change commit 7b35fa86e47f83db27056b202463d926ff0a2c8f Merge: 29ca069... f1373da... Author: Linus Torvalds Date: Fri Jul 25 17:33:34 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc: Wire up new system calls. commit 29ca069cc6572cce62e42a27efdab01f50190616 Merge: b4615e6... 3e4d0ca... Author: Linus Torvalds Date: Fri Jul 25 17:29:03 2008 -0700 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Wire up new system calls commit b4615e69b6c6353878b734a8202b65efbc554df4 Author: Harvey Harrison Date: Fri Jul 25 13:19:22 2008 -0700 sys_paccept definition missing __user annotation Introduced by commit aaca0bdca573f3f51ea03139f9c7289541e7bca3 ("flag parameters: paccept"): net/socket.c:1515:17: error: symbol 'sys_paccept' redeclared with different type (originally declared at include/linux/syscalls.h:413) - incompatible argument 4 (different address spaces) Signed-off-by: Harvey Harrison Signed-off-by: Linus Torvalds commit fc532f810832beb3306b42526a78f411972281c7 Author: Nathan Lynch Date: Fri Jul 25 17:50:30 2008 -0500 powerpc: Fix boot problem due to AT_BASE_PLATFORM change Commit 9115d13453dee22473a1e8cacc90a8d64a9c4bc9 ("powerpc: Enable AT_BASE_PLATFORM aux vector") broke boot on 32-bit powerpc systems; we have to use PTRRELOC to initialize powerpc_base_platform this early in boot. Bug reported by Jon Smirl. Signed-off-by: Nathan Lynch Signed-off-by: Benjamin Herrenschmidt commit f1373da87be917e5b2356af44764620487376a07 Author: David S. Miller Date: Fri Jul 25 15:18:31 2008 -0700 sparc: Wire up new system calls. This wires up the recently added Wire up signalfd4, eventfd2, epoll_create1, dup3, pipe2, and inotify_init1 system calls. Signed-off-by: David S. Miller commit ff5d48a6d18d09bb750d1f89f6464f5fdb6fc85b Merge: 762b829... a29ccf6... Author: Linus Torvalds Date: Fri Jul 25 12:02:08 2008 -0700 Merge git://git.infradead.org/embedded-2.6 * git://git.infradead.org/embedded-2.6: Make console charset translation optional commit 762b8291be6944bd891fbe2c8976a2b2e5bbc726 Merge: c6af5e9... 7dcf2a9... Author: Linus Torvalds Date: Fri Jul 25 12:01:37 2008 -0700 Merge git://git.infradead.org/~dwmw2/random-2.6 * git://git.infradead.org/~dwmw2/random-2.6: remove dummy asm/kvm.h files firmware: create firmware binaries during 'make modules'. commit c6af5e9f8a57467df2e55e428316a43480174521 Author: Johannes Weiner Date: Fri Jul 25 15:48:04 2008 +0200 bootmem: Move node allocation macros back to !HAVE_ARCH_BOOTMEM_NODE These got unintentionally moved, put them back as x86 provides its own versions. Signed-off-by: Johannes Weiner Signed-off-by: Linus Torvalds commit 7dcf2a9fced59e58e4694cdcf15850c01fdba89b Author: Adrian Bunk Date: Tue Jul 1 19:27:16 2008 +0300 remove dummy asm/kvm.h files This patch removes the dummy asm/kvm.h files on architectures not (yet) supporting KVM and uses the same conditional headers installation as already used for a.out.h . Also removed are superfluous install rules in the s390 and x86 Kbuild files (they are already in Kbuild.asm). Signed-off-by: Adrian Bunk Acked-by: Sam Ravnborg Signed-off-by: David Woodhouse commit 9b81361631bbb1d85c99ddec677d42afe516737b Author: Ingo Molnar Date: Fri Jul 25 13:02:37 2008 +0200 signalfd: fix undefined reference to `compat_sys_signalfd4' when !CONFIG_SIGNALFD fix: arch/x86/ia32/built-in.o: In function `ia32_sys_call_table': (.rodata+0xa38): undefined reference to `compat_sys_signalfd4' on !CONFIG_SIGNALFD. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds commit e44d1b2998d62a1f2f4d7eb17b56ba396535509f Author: Ingo Molnar Date: Fri Jul 25 12:57:41 2008 +0200 mm/hugetlb.c: fix build failure with !CONFIG_SYSCTL on !CONFIG_SYSCTL on x86 with latest -git i get: mm/hugetlb.c: In function 'decrement_hugepage_resv_vma': mm/hugetlb.c:83: error: 'reserve' undeclared (first use in this function) mm/hugetlb.c:83: error: (Each undeclared identifier is reported only once mm/hugetlb.c:83: error: for each function it appears in.) Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds commit 44463f7dd6c8039904333e4374e5c6e9ad83006f Author: David Woodhouse Date: Fri Jul 25 14:17:19 2008 -0400 firmware: create firmware binaries during 'make modules'. This means that we no longer need write access to the source tree while doing 'make modules_install'. Signed-off-by: David Woodhouse commit 5047887caf1806f31652210df27fb62a7c43f27d Merge: 996abf0... 973b7d8... Author: Linus Torvalds Date: Fri Jul 25 11:08:17 2008 -0700 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (34 commits) powerpc: Wireup new syscalls Move update_mmu_cache() declaration from tlbflush.h to pgtable.h powerpc/pseries: Remove kmalloc call in handling writes to lparcfg powerpc/pseries: Update arch vector to indicate support for CMO ibmvfc: Add support for collaborative memory overcommit ibmvscsi: driver enablement for CMO ibmveth: enable driver for CMO ibmveth: Automatically enable larger rx buffer pools for larger mtu powerpc/pseries: Verify CMO memory entitlement updates with virtual I/O powerpc/pseries: vio bus support for CMO powerpc/pseries: iommu enablement for CMO powerpc/pseries: Add CMO paging statistics powerpc/pseries: Add collaborative memory manager powerpc/pseries: Utilities to set firmware page state powerpc/pseries: Enable CMO feature during platform setup powerpc/pseries: Split retrieval of processor entitlement data into a helper routine powerpc/pseries: Add memory entitlement capabilities to /proc/ppc64/lparcfg powerpc/pseries: Split processor entitlement retrieval and gathering to helper routines powerpc/pseries: Remove extraneous error reporting for hcall failures in lparcfg powerpc: Fix compile error with binutils 2.15 ... Fixed up conflict in arch/powerpc/platforms/52xx/Kconfig manually. commit 996abf053eec4d67136be8b911bbaaf989cfb99c Merge: 93082f0... d37e6bf... Author: Linus Torvalds Date: Fri Jul 25 11:02:17 2008 -0700 Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 * 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6: (22 commits) UBI: always start the background thread UBI: fix gcc warning UBI: remove pre-sqnum images support UBI: fix kernel-doc errors and warnings UBI: fix checkpatch.pl errors and warnings UBI: bugfix - do not torture PEB needlessly UBI: rework scrubbing messages UBI: implement multiple volumes rename UBI: fix and re-work debugging stuff UBI: amend commentaries UBI: fix error message UBI: improve mkvol request validation UBI: add ubi_sync() interface UBI: fix 64-bit calculations UBI: fix LEB locking UBI: fix memory leak on error path UBI: do not forget to free internal volumes UBI: fix memory leak UBI: avoid unnecessary division operations UBI: fix buffer padding ... commit 93082f0b15841b8926c38ef224d0e6f720000635 Author: Linus Torvalds Date: Fri Jul 25 10:56:36 2008 -0700 Fix ahci driver 'flags' type The new type checking of the flags arguments to irqsave and friends (commit 3f307891ce0e7b0438c432af1aacd656a092ff45) pointed out this thing with a big nice warning. Signed-off-by: Linus Torvalds commit f87bd330edf06fd49b3fbc368d90fb180375f2a2 Author: Dave Jiang Date: Fri Jul 25 01:49:14 2008 -0700 edac: mpc85xx fix pci ofdev 2nd pass Convert PCI err device from platform to open firmware of_dev to comply with powerpc schemes. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Dave Jiang Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fcb19171d196172a4f57e056f7a60e6d1e2e8c85 Author: Dave Jiang Date: Fri Jul 25 01:49:14 2008 -0700 edac: mv64x60 add pci fixup Fixup of missing bit 0 on 64360 PCIx_ERR_MASK and errata FEr-#11 and FEr-#16 for the 64460. Bit 0 must remain 0. Signed-off-by: Dave Jiang Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 596d3941035d4d4b484c820f10f57fd4816c6615 Author: Dave Jiang Date: Fri Jul 25 01:49:13 2008 -0700 edac: mv64x60 fix get_property Update get_property() call to use of_get_property() in order to fix compile Signed-off-by: Dave Jiang Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 10d33e9c36827e5371479e55ef4089e000af2638 Author: Doug Thompson Date: Fri Jul 25 01:49:12 2008 -0700 edac: e752x fix too loud on nonmemory errors This module harvests more than just memory errors, it also harvests various bus and dma errors that the Chipset detects. Previously, it would report all such errors, which would cause output to be TOO loud. This patches therefore adds a parameter which is used to turn off NON-MEMORY error reports by default. Or the reporting can be enabled via the parameter Also did code style cleanup: less than 80 characters per line rule Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 124682c78563e10ba8b2ecd21b0f1098903b7808 Author: Arthur Jones Date: Fri Jul 25 01:49:12 2008 -0700 edac: core fix added newline to sysfs dimm labels The channel DIMM label does not seem to be used much in the edac code. However, where it is used (in the core code), it is assumed to not have a newline embedded. This leaves the sysfs file newline free which looks funny when cat'ing it. Here we just add the trailing newline to the sysfs chX_dimm_label output... [Doug Thompson note: the DIMM label is one of the primary uses of EDAC. User space daemon scripts, edac-utils@sourceforge, populate the DIMM label fields, via /sys/devices/system/edac attributes, with the silk screen labels of the motherboard in use. dmidecode access BIOS tables, but BIOS tables are well known to be incorrect and useless in these respects. edac-utils will strip off any newlines before its use of the output, when displaying DIMM slot silk screen labels. Signed-off-by: Arthur Jones Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9fc82adca43d38a1b79128d80750bd361e15abe Author: Arthur Jones Date: Fri Jul 25 01:49:11 2008 -0700 edac: core fix static to dynamic kset Static kobjects and ksets are not supported in Linux kernel. Convert the mc_kset from static to dynamic. This patch depends on my previous patch to remove the module parameter attributes from mc... Signed-off-by: Arthur Jones Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 327dafb1c61c9da7b95ac6cc7634a2340cc9509c Author: Arthur Jones Date: Fri Jul 25 01:49:10 2008 -0700 edac: core fix redundant sysfs controls to parameters /sys/devices/system/edac/mc has a few files which are duplicated in /sys/module/edac_core/parameters. Now that all the functionality is duplicated between these two locations, we remove the former kobject attributes and update the documentation. Signed-off-by: Arthur Jones Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 096846e2b0ef39cb7c348f837f06984ef6ba8aa7 Author: Arthur Jones Date: Fri Jul 25 01:49:09 2008 -0700 edac: core fix workq timer When updating the edac_mc_poll_msec module parameter from the sysfs /sys/module/edac_core/parameters/edac_mc_poll_msec file, we don't update the workq timers. So that, if we move from a big poll time to a small one, the small one won't take effect until the big one has timed out. Here we provide a new module parameter set method to call out to the update routine. This brings the /sys/module/edac_core/parameters functionality up to that provided by the /sys/drivers/system/edac/mc sysfs module parameter files so that we can remove them or at least link to the /sys/module files... Signed-off-by: Arthur Jones Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 14cc571bb1d072d3f4be2875ea520ab03e093471 Author: Arthur Jones Date: Fri Jul 25 01:49:08 2008 -0700 edac: core fix to use dynamic kobject Static kobjects are not supported in linux kernel. Convert the edac_pci_top_main_kobj from static to dynamic. This avoids the double free of the edac_pci_top_main_kobj.name that we see on module reload of the e752x edac driver (and probably others as well). In addition Greg KH has pointed out that this code may be cleaned up significantly. I will look at that as a follow-on patch, for now, I just want the minimum fix to get this double-free oops bug squashed... Many thanks to Greg KH for his patience in showing me what the Documentation/kobject.txt already said (oops)... Signed-off-by: Arthur Jones Signed-off-by: Doug Thompson Acked-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b238e57723a6fb2c365fc35de5d7c48ccf9300cd Author: Arthur Jones Date: Fri Jul 25 01:49:08 2008 -0700 edac: i5100: cleanup Some code cleanliness issues found by Andrew Morton (thanks!) which should not affect functionality, but which should help make the code more maintainable. In particular, we now: * convert all #define's w/ a parameter to static inlines * use 1UL rather than 1ULL when calculating an unsigned long * use pci_disable_device The resulting code is tested and seems to work fine... Signed-off-by: Arthur Jones Cc: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 178d5a742291976d13bff55fa2b130879d4510de Author: Arthur Jones Date: Fri Jul 25 01:49:06 2008 -0700 edac: i5100 fix unmask ecc bits Explicitly unmask ECC errors we are interested in reporting. Signed-off-by: Arthur Jones Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 43920a598f9358a12eb59eeddc4cd950f03aea8c Author: Arthur Jones Date: Fri Jul 25 01:49:06 2008 -0700 edac: i5100 fix enable ecc hardware It is possible that the BIOS did not enable ECC at boot time. We check for that case and fail to load if it is true. Signed-off-by: Arthur Jones Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f7952ffcffa88c9a3fa92c26081f4ec9143c680f Author: Arthur Jones Date: Fri Jul 25 01:49:05 2008 -0700 edac: i5100 fix missing bits The error mask we use to trigger ECC notifications is missing many bits of interest. We add these bits here so that all possible ECC errors can be reported. Signed-off-by: Arthur Jones Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f421c595a9145959d8aab09172743132abdffdb Author: Arthur Jones Date: Fri Jul 25 01:49:04 2008 -0700 edac: i5100 new intel chipset driver Preliminary support for the Intel 5100 MCH. CE and UE errors are reported along with the current DIMM label information and other memory parameters. Reasons why this is preliminary: 1) This chip has 2 independent memory controllers which, for best perforance, use interleaved accesses to the DDR2 memory. This architecture does not map very well to the current edac data structures which depend on symmetric channel access to the interleaved data. Without core changes, the best I could do for now is to map both memory controllers to different csrows (first all ranks of controller 0, then all ranks of controller 1). Someone much more familiar with the edac core than I will probably need to come up with a more general data structure to handle the interleaving and de-interleaving of the two memory controllers. 2) I have not yet tackled the de-interleaving of the rank/controller address space into the physical address space of the CPU. There is nothing fundamentally missing, it is just ending up to be a lot of code, and I'd rather keep it separate for now, esp since it doesn't work yet... 3) The code depends on a particular i5100 chip select to DIMM mainboard chip select mapping. This mapping seems obvious to me in order to support dual and single ranked memory, but it is not unique and DIMM labels could be wrong on other mainboards. There is no way to query this mapping that I know of. 4) The code requires that the i5100 is in 32GB mode. Only 4 ranks per controller, 2 ranks per DIMM are supported. I do not have hardware (nor do I expect to have hardware anytime soon) for the 48GB (6 ranks per controller) mode. 5) The serial presence detect code should be broken out into a "real" i2c driver so that decode-dimms.pl can work. Signed-off-by: Arthur Jones Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48e90761b570ff57f58b726229d229729949c5bb Author: Miklos Szeredi Date: Fri Jul 25 01:49:02 2008 -0700 fuse: lockd support If fuse filesystem doesn't define it's own lock operations, then allow the lock manager to work with fuse. Adding lockd support for remote locking is also possible, but more rarely used, so leave it till later. Signed-off-by: Miklos Szeredi Cc: "J. Bruce Fields" Cc: Trond Myklebust Cc: Matthew Wilcox Cc: David Teigland Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 33670fa296860283f04a7975b8c790f101e43a6e Author: Miklos Szeredi Date: Fri Jul 25 01:49:02 2008 -0700 fuse: nfs export special lookups Implement the get_parent export operation by sending a LOOKUP request with ".." as the name. Implement looking up an inode by node ID after it has been evicted from the cache. This is done by seding a LOOKUP request with "." as the name (for all file types, not just directories). The filesystem can set the FUSE_EXPORT_SUPPORT flag in the INIT reply, to indicate that it supports these special lookups. Thanks to John Muir for the original implementation of this feature. Signed-off-by: Miklos Szeredi Cc: "J. Bruce Fields" Cc: Trond Myklebust Cc: Matthew Wilcox Cc: David Teigland Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c180eebe1390c2076ead6a9bc95a02efb994edb7 Author: Miklos Szeredi Date: Fri Jul 25 01:49:01 2008 -0700 fuse: add fuse_lookup_name() helper Add a new helper function which sends a LOOKUP request with the supplied name. This will be used by the next patch to send special LOOKUP requests with "." and ".." as the name. Signed-off-by: Miklos Szeredi Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dbd561d236ff16f8143bc727d91758ddd190e8cb Author: Miklos Szeredi Date: Fri Jul 25 01:49:00 2008 -0700 fuse: add export operations Implement export_operations, to allow fuse filesystems to be exported to NFS. This feature has been in the out-of-tree fuse module, and is widely used and tested. It has not been originally merged into mainline, because doing the NFS export in userspace was thought to be a cleaner and more efficient way of doing it, than through the kernel. While that is true, it would also have involved a lot of duplicated effort at reimplementing NFS exporting (all the different versions of the protocol). This effort was unfortunately not undertaken by anyone, so we are left with doing it the easy but less efficient way. If this feature goes in, the out-of-tree fuse module can go away, which would have several advantages: - not having to maintain two versions - less confusion for users - no bugs due to kernel API changes Comment from hch: - Use the same fh_type values as XFS, since we use the same fh encoding. Signed-off-by: Miklos Szeredi Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0de6256daafa3a97a269995e9b29f956bd419bbf Author: Miklos Szeredi Date: Fri Jul 25 01:48:59 2008 -0700 fuse: prepare lookup for nfs export Use d_splice_alias() instead of d_add() in fuse lookup code, to allow NFS exporting. Signed-off-by: Miklos Szeredi Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 764c76b371722e0cba5c24d91225f0f954b69d44 Author: Miklos Szeredi Date: Fri Jul 25 01:48:58 2008 -0700 locks: allow ->lock() to return FILE_LOCK_DEFERRED Allow filesystem's ->lock() method to call posix_lock_file() instead of posix_lock_file_wait(), and return FILE_LOCK_DEFERRED. This makes it possible to implement a such a ->lock() function, that works with the lock manager, which needs the call to be asynchronous. Now the vfs_lock_file() helper can be used, so this is a cleanup as well. Signed-off-by: Miklos Szeredi Cc: "J. Bruce Fields" Cc: Trond Myklebust Cc: Matthew Wilcox Cc: David Teigland Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b648a6de00770cc325c22f43bdd4e935f6a2ee55 Author: Miklos Szeredi Date: Fri Jul 25 01:48:57 2008 -0700 locks: cleanup code duplication Extract common code into a function. Signed-off-by: Miklos Szeredi Cc: "J. Bruce Fields" Cc: Trond Myklebust Cc: Matthew Wilcox Cc: David Teigland Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bde74e4bc64415b142e556a34d295a52a1b7da9d Author: Miklos Szeredi Date: Fri Jul 25 01:48:57 2008 -0700 locks: add special return value for asynchronous locks Use a special error value FILE_LOCK_DEFERRED to mean that a locking operation returned asynchronously. This is returned by posix_lock_file() for sleeping locks to mean that the lock has been queued on the block list, and will be woken up when it might become available and needs to be retried (either fl_lmops->fl_notify() is called or fl_wait is woken up). f_op->lock() to mean either the above, or that the filesystem will call back with fl_lmops->fl_grant() when the result of the locking operation is known. The filesystem can do this for sleeping as well as non-sleeping locks. This is to make sure, that return values of -EAGAIN and -EINPROGRESS by filesystems are not mistaken to mean an asynchronous locking. This also makes error handling in fs/locks.c and lockd/svclock.c slightly cleaner. Signed-off-by: Miklos Szeredi Cc: Trond Myklebust Cc: "J. Bruce Fields" Cc: Matthew Wilcox Cc: David Teigland Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc77b1521d06be07c9bb1a4a3e1f775dcaa15093 Author: Miklos Szeredi Date: Fri Jul 25 01:48:55 2008 -0700 lockd: dont return EAGAIN for a permanent error Fix nlm_fopen() to return NLM_FAILED (or NLM_LCK_DENIED_NOLOCKS) instead of NLM_LCK_DENIED. The latter means the lock request failed because of a conflicting lock (i.e. a temporary error), which is wrong in this case. Also fix the client to return ENOLCK instead of EAGAIN if a blocking lock request returns with NLM_LOCK_DENIED. Signed-off-by: Miklos Szeredi Cc: Trond Myklebust Cc: "J. Bruce Fields" Cc: Matthew Wilcox Cc: David Teigland Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b81f3ea92ba1fa676775677679889dc2a7f03c8b Author: Vegard Nossum Date: Fri Jul 25 01:48:55 2008 -0700 taskstats: remove initialization of static per-cpu variable Cc: Shailabh Nagar Signed-off-by: Vegard Nossum Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b0975a20af1ff2f367e3b6b7c150eb114c6b500 Author: Keika Kobayashi Date: Fri Jul 25 01:48:54 2008 -0700 per-task-delay-accounting: update document and getdelays.c for memory reclaim Update document and make getdelays.c show delay accounting for memory reclaim. For making a distinction between "swapping in pages" and "memory reclaim" in getdelays.c, MEM is changed to SWAP. Signed-off-by: Keika Kobayashi Acked-by: Balbir Singh Cc: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 016ae219b920c4e606088761d3d6070cdf8ba706 Author: Keika Kobayashi Date: Fri Jul 25 01:48:53 2008 -0700 per-task-delay-accounting: update taskstats for memory reclaim delay Add members for memory reclaim delay to taskstats, and accumulate them in __delayacct_add_tsk() . Signed-off-by: Keika Kobayashi Cc: Hiroshi Shimamoto Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 873b47717732c2f33a4b14de02571a4295a02f0c Author: Keika Kobayashi Date: Fri Jul 25 01:48:52 2008 -0700 per-task-delay-accounting: add memory reclaim delay Sometimes, application responses become bad under heavy memory load. Applications take a bit time to reclaim memory. The statistics, how long memory reclaim takes, will be useful to measure memory usage. This patch adds accounting memory reclaim to per-task-delay-accounting for accounting the time of do_try_to_free_pages(). - When System is under low memory load, memory reclaim may not occur. $ free total used free shared buffers cached Mem: 8197800 1577300 6620500 0 4808 1516724 -/+ buffers/cache: 55768 8142032 Swap: 16386292 0 16386292 $ vmstat 1 procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 0 5069748 10612 3014060 0 0 0 0 3 26 0 0 100 0 0 0 0 5069748 10612 3014060 0 0 0 0 4 22 0 0 100 0 0 0 0 5069748 10612 3014060 0 0 0 0 3 18 0 0 100 0 Measure the time of tar command. $ ls -s test.dat 1501472 test.dat $ time tar cvf test.tar test.dat real 0m13.388s user 0m0.116s sys 0m5.304s $ ./delayget -d -p CPU count real total virtual total delay total 428 5528345500 5477116080 62749891 IO count delay total 338 8078977189 SWAP count delay total 0 0 RECLAIM count delay total 0 0 - When system is under heavy memory load memory reclaim may occur. $ vmstat 1 procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 7159032 49724 1812 3012 0 0 0 0 3 24 0 0 100 0 0 0 7159032 49724 1812 3012 0 0 0 0 4 24 0 0 100 0 0 0 7159032 49848 1812 3012 0 0 0 0 3 22 0 0 100 0 In this case, one process uses more 8G memory by execution of malloc() and memset(). $ time tar cvf test.tar test.dat real 1m38.563s <- increased by 85 sec user 0m0.140s sys 0m7.060s $ ./delayget -d -p CPU count real total virtual total delay total 9021 7140446250 7315277975 923201824 IO count delay total 8965 90466349669 SWAP count delay total 3 21036367 RECLAIM count delay total 740 61011951153 In the later case, the value of RECLAIM is increasing. So, taskstats can show how much memory reclaim influences TAT. Signed-off-by: Keika Kobayashi Acked-by: Balbir Singh Acked-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3e85ba034deec351f02cb55ff225bbd616463841 Author: David Howells Date: Fri Jul 25 01:48:50 2008 -0700 tsacct: fix bacct_add_tsk()'s use of do_div() Fix bacct_add_tsk()'s use of do_div() on an s64 by making ac_etime a u64 instead and dividing that. Possibly this should be guarded lest the interval calculation turn up negative, but the possible negativity of the result of the division is cast away, and it shouldn't end up negative anyway. This was introduced by patch f3cef7a99469afc159fec3a61b42dc7ca5b6824f. Signed-off-by: David Howells Cc: Jay Lan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 297c5d92634c809cef23d73e7b2556f2528ff7e2 Author: Andrea Righi Date: Fri Jul 25 01:48:49 2008 -0700 task IO accounting: provide distinct tgid/tid I/O statistics Report per-thread I/O statistics in /proc/pid/task/tid/io and aggregate parent I/O statistics in /proc/pid/io. This approach follows the same model used to account per-process and per-thread CPU times. As a practial application, this allows for example to quickly find the top I/O consumer when a process spawns many child threads that perform the actual I/O work, because the aggregated I/O statistics can always be found in /proc/pid/io. [ Oleg Nesterov points out that we should check that the task is still alive before we iterate over the threads, but also says that we can do that fixup on top of this later. - Linus ] Acked-by: Balbir Singh Signed-off-by: Andrea Righi Cc: Matt Heaton Cc: Shailabh Nagar Acked-by-with-comments: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c18d7a5df82524e634637c3aec24d4cba096442 Author: Pavel Emelyanov Date: Fri Jul 25 01:48:49 2008 -0700 bsdacct: fix and add comments around acct_process() Fix the one describing what this function is and add one more - about locking absence around pid namespaces loop. Signed-off-by: Pavel Emelyanov Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7d1e13505be8c2bd2207894f4e0f069e1f9b51c9 Author: Pavel Emelyanov Date: Fri Jul 25 01:48:48 2008 -0700 bsdacct: account dying tasks in all relevant namespaces This just makes the acct_proces walk the pid namespaces from current up to the top and account a task in each with the accounting turned on. ns->parent access if safe lockless, since current it still alive and holds its namespace, which in turn holds its parent. Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b5a7174875ea570cc675f2c503e800db8efdd6a7 Author: Pavel Emelyanov Date: Fri Jul 25 01:48:47 2008 -0700 bsdacct: turn acct off for all pidns-s on umount time All the bsd_acct_strcts with opened accounting are linked into a global list. So, the acct_auto_close(_mnt) walks one and drops the accounting for each. Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b6b030fc30d169bb406b34b4fc60d99dde4a9c6 Author: Pavel Emelyanov Date: Fri Jul 25 01:48:47 2008 -0700 bsdacct: switch from global bsd_acct_struct instance to per-pidns one Allocate the structure on the first call to sys_acct(). After this each namespace, that ordered the accounting, will live with this structure till its own death. Two notes - routines, that close the accounting on fs umount time use the init_pid_ns's acct by now; - accounting routine accounts to dying task's namespace (also by now). Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6248b1b342005a428b1247b4e89249da1528d88d Author: Pavel Emelyanov Date: Fri Jul 25 01:48:46 2008 -0700 bsdacct: make internal code work with passed bsd_acct_struct, not global This adds the appropriate pointer to all the internal (i.e. static) functions that work with global acct instance. API calls pass a global instance to them (while we still have such). Mostly this is a s/acct_globals./acct->/ over the file. Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a75d97976517dcda69150fd81d6be86ae63324a1 Author: Pavel Emelyanov Date: Fri Jul 25 01:48:45 2008 -0700 bsdacct: turn the acct_lock from on-the-struct to global Don't use per-bsd-acct-struct lock, but work with a global one. This lock is taken for short periods, so it doesn't seem it'll become a bottleneck, but it will allow us to easily avoid many locking difficulties in the future. So this is a mostly s/acct_globals.lock/acct_lock/ over the file. Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e59a04a7aa5ce2483470aee4f2eb79ba6b9afe8b Author: Pavel Emelyanov Date: Fri Jul 25 01:48:44 2008 -0700 bsdacct: make check timer accept a bsd_acct_struct argument We're going to have many bsd_acct_struct instances, not just one, so the timer (currently working with a global one) has to know which one to work with. Use a handy setup_timer macro for it (thanks to Oleg for one). Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c552858ac2b1732a99d234d46b98098baef41ff Author: Pavel Emelyanov Date: Fri Jul 25 01:48:44 2008 -0700 bsdacct: "truthify" a comment near acct_process The acct_process does not accept any arguments actually. Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 20fad13ac66ac001c19220d3d08b4de5b6cca6e1 Author: Pavel Emelyanov Date: Fri Jul 25 01:48:43 2008 -0700 pidns: add the struct bsd_acct_struct pointer on pid_namespace struct All the bsdacct-related info will be stored in the area, pointer by this one. It will be NULL automatically for all new namespaces. Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84406c153a5bfa5d8b428a0933e9d39db6b59a75 Author: Pavel Emelyanov Date: Fri Jul 25 01:48:42 2008 -0700 pidns: use kzalloc when allocating new pid_namespace struct It makes many fields initialization implicit helping in auto-setting #ifdef-ed fields (bsd-acct related pointer will be such). Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 081e4c8a75692c21f3a119a81ca3270081879d0e Author: Pavel Emelyanov Date: Fri Jul 25 01:48:42 2008 -0700 bsdacct: rename acct_gbls to bsd_acct_struct After I fixed access to task->tgid in kernel/acct.c, Oleg pointed out some bad side effects with this accounting vs pid namespaces interaction. I.e. when some task in pid namespace sets this accounting up, this blocks all the others from doing the same. Restricting this to init namespace only could help, but didn't look a graceful solution. So here is the approach to make this accounting work with pid namespaces properly. The idea is simple - when a task dies it accounts itself in each namespace it is visible from and which set the accounting up. For example here are the commands run and the output of lastcomm from init and sub namespaces: init_ns# accton pacct sub_ns# accton pacct (this is a different file - sub ns is run in a chroot-ed environment) init_ns# cat /dev/null sub_ns# ls /dev/null init_ns# accton sub_ns# accton sub_ns# lastcomm -f pacct ls 0 [136,0] 0.00 secs Thu May 15 10:30 accton 0 [136,0] 0.00 secs Thu May 15 10:30 init_ns# lastcomm -f pacct accton root pts/0 0.00 secs Thu May 15 14:30 << got from sub cat root pts/1 0.00 secs Thu May 15 14:30 ls root pts/0 0.00 secs Thu May 15 14:30 << got from sub accton root pts/1 0.00 secs Thu May 15 14:30 That was the summary, the details are in patches. This patch: It will be visible in pid_namespace.h file, so fix its name to look better outside the acct.c file. Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 49b5cf34727a6c1be1568ab28e89a2d9a6bf51e0 Author: Jonathan Lim Date: Fri Jul 25 01:48:40 2008 -0700 accounting: account for user time when updating memory integrals Adapt acct_update_integrals() to include user time when calculating the time difference. The units of acct_rss_mem1 and acct_vm_mem1 are also changed from pages-jiffies to pages-usecs to avoid calling jiffies_to_usecs() in xacct_add_tsk() which might overflow. Signed-off-by: Jonathan Lim Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7394f0f6c0baab650ea9194cb1be847df646fb57 Author: Adrian Bunk Date: Fri Jul 25 01:48:40 2008 -0700 unexport uts_sem With the removal of the Solaris binary emulation the export of uts_sem became unused. Signed-off-by: Adrian Bunk Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a89cc1959d0ea5f36bf7421dc97b34f03809637d Author: Harvey Harrison Date: Fri Jul 25 01:48:39 2008 -0700 markers: fix sparse integer as NULL pointer warning kernel/trace/trace_sysprof.c:164:20: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison Cc: Mathieu Desnoyers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28325df0d9339b7f3aba9c45174d4586223ef46b Author: Mathieu Desnoyers Date: Fri Jul 25 01:48:38 2008 -0700 markers: use rcu_barrier_sched() and call_rcu_sched() rcu_barrier_sched() and call_rcu_sched() were introduced in 2.6.26 for the Markers. Change the marker code to use them. It can be seen as a fix since the marker code was using an ugly, temporary, #ifdef hack to work around CONFIG_PREEMPT_RCU. Signed-off-by: Mathieu Desnoyers Acked-by: Paul McKenney Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 24879a8e3e68f146d4d85528cc0b5dea712b77c5 Author: Matthias Kaehlcke Date: Fri Jul 25 01:48:38 2008 -0700 aoe: convert emsgs_sema into a completion ATA over Ethernet: The semaphore emsgs_sema is used for signalling an event, convert it in a completion. Signed-off-by: Matthias Kaehlcke Cc: "Ed L. Cashin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dbda0de52618d13d1b927c7ba7bb839cfddc4e8c Author: Pavel Emelyanov Date: Fri Jul 25 01:48:37 2008 -0700 pidns: remove find_task_by_pid, unused for a long time It seems to me that it was a mistake marking this function as deprecated and scheduling it for removal, rather than resolutely removing it after the last caller's death. Anyway - better late, then never. Signed-off-by: Pavel Emelyanov Cc: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e49859e71e0318b564de1546bdc30fab738f9deb Author: Pavel Emelyanov Date: Fri Jul 25 01:48:36 2008 -0700 pidns: remove now unused find_pid function. This one had the only users so far - the kill_proc, which is removed, so drop this (invalid in namespaced world) call too. And of course - erase all references on it from comments. Signed-off-by: Pavel Emelyanov Cc: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19b0cfcca41dd772065671ad0584e1cea0f3fd13 Author: Pavel Emelyanov Date: Fri Jul 25 01:48:35 2008 -0700 pidns: remove now unused kill_proc function This function operated on a pid_t to kill a task, which is no longer valid in a containerized system. It has finally lost all its users and we can safely remove it from the tree. Signed-off-by: Pavel Emelyanov Cc: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 33166b1ffca5e1945246bcaa77d72a22b0d3e531 Author: Richard Kennedy Date: Fri Jul 25 01:48:35 2008 -0700 shrink struct pid by removing padding on 64 bit builds When struct pid is built on a 64 bit platform gcc has to insert padding to maintain the correct alignment, by simply reordering its members the memory usage shrinks from 88 bytes to 80. I've successfully run with this patch on my desktop AMD64 machine. There are no significant kernel size changes to a default config.X86_64 on the latest git v2.6.26-rc1 text data bss dec hex filename 5404828 976760 734280 7115868 6c945c vmlinux 5404811 976760 734280 7115851 6c944b vmlinux.pid-patch Acked-by: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3ae4eed34be0177a8e003411a84e4ee212adbced Author: Adrian Bunk Date: Fri Jul 25 01:48:34 2008 -0700 proper pid{hash,map}_init() prototypes This patch adds proper prototypes for pid{hash,map}_init() in include/linux/pid_namespace.h Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ecb90090c84210a8bd2a9d7a5906e616735873c Author: Stephen Hemminger Date: Fri Jul 25 01:48:32 2008 -0700 sysctl: allow override of /proc/sys/net with CAP_NET_ADMIN Extend the permission check for networking sysctl's to allow modification when current process has CAP_NET_ADMIN capability and is not root. This version uses the until now unused permissions hook to override the mode value for /proc/sys/net if accessed by a user with capabilities. Found while working with Quagga. It is impossible to turn forwarding on/off through the command interface because Quagga uses secure coding practice of dropping privledges during initialization and only raising via capabilities when necessary. Since the dameon has reset real/effective uid after initialization, all attempts to access /proc/sys/net variables will fail. Signed-off-by: Stephen Hemminger Acked-by: "Eric W. Biederman" Cc: Chris Wright Cc: Alexey Dobriyan Cc: Andrew Morgan Cc: Pavel Emelyanov Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99541c23cd32bacf1a591ca537a7c0cb9053ad7e Author: Alexey Dobriyan Date: Fri Jul 25 01:48:31 2008 -0700 sysctl: check for bogus modes Catch, e. g., 644/0644 typo. Signed-off-by: Alexey Dobriyan Acked-by: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 339caf2a224fc9af0f01686bf287dda32c6efca6 Author: David Sterba Date: Fri Jul 25 01:48:31 2008 -0700 proc: misplaced export of find_get_pid Move EXPORT_SYMBOL right after the func Signed-off-by: David Sterba Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6eedf8d30d2b48e86fbcee1a32fb2fa5f42219ee Author: Alexey Dobriyan Date: Fri Jul 25 01:48:30 2008 -0700 proc: move Kconfig to fs/proc/Kconfig Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9bd4a3e070ba7494f154e1a11687a8a957d88dc Author: Alexey Dobriyan Date: Fri Jul 25 01:48:30 2008 -0700 proc: remove pathetic remount code MS_RMT_MASK will unmask changes in do_remount_sb() anyway. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 881adb85358309ea9c6f707394002719982ec607 Author: Alexey Dobriyan Date: Fri Jul 25 01:48:29 2008 -0700 proc: always do ->release Current two-stage scheme of removing PDE emphasizes one bug in proc: open rmmod remove_proc_entry close ->release won't be called because ->proc_fops were cleared. In simple cases it's small memory leak. For every ->open, ->release has to be done. List of openers is introduced which is traversed at remove_proc_entry() if neeeded. Discussions with Al long ago (sigh). Signed-off-by: Alexey Dobriyan Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e644c3126149b65460610fe5a00d8a162092abe Author: Adrian Bunk Date: Fri Jul 25 01:48:28 2008 -0700 move proc_kmsg_operations to fs/proc/internal.h This patch moves the extern of struct proc_kmsg_operations to fs/proc/internal.h and adds an #include "internal.h" to fs/proc/kmsg.c so that the latter sees the former. Signed-off-by: Adrian Bunk Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd9a6f1078ed07fe919667b73e829f3bac485573 Author: Adrian Bunk Date: Fri Jul 25 01:48:28 2008 -0700 unexport proc_clear_tty With the removal of the Solaris binary emulation the export of proc_clear_tty became unused. Signed-off-by: Adrian Bunk Acked-by: David S. Miller Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 25377479de7539fdc871a0f0ecaa39da42353bbc Author: Akinobu Mita Date: Fri Jul 25 01:48:27 2008 -0700 dell_rbu: use memory_read_from_buffer() Signed-off-by: Akinobu Mita Cc: Abhay Salunke Cc: Zhang Rui Cc: Matt Domsch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d991696263a704be7f41ac186f1a0ed17963c260 Author: Thomas Gleixner Date: Fri Jul 25 01:48:26 2008 -0700 fs/partitions/efi: convert to pr_debug convert the local Dprintk() compile time debug printk wrappers to the generic pr_debug() wrapper. Signed-off-by: Thomas Gleixner Cc: Matt Domsch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04ebd4aee52b06a2c38127d9208546e5b96f3a19 Author: Abdel Benamrouche Date: Fri Jul 25 01:48:26 2008 -0700 block/ioctl.c and fs/partition/check.c: check value returned by add_partition() Now that add_partition() has been aught to propagate errors, let's check them. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Abdel Benamrouche Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d805dda412346225a50af2d399d958a4bc676c38 Author: Abdel Benamrouche Date: Fri Jul 25 01:48:25 2008 -0700 fs/partition/check.c: fix return value warning fs/partitions/check.c:381: warning: ignoring return value of ___device_add___, declared with attribute warn_unused_result [akpm@linux-foundation.org: multiple-return-statements-per-function are evil] Signed-off-by: Abdel Benamrouche Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit abe19b7b822a8fdbe3dbfd6e066d0698b4eefb06 Author: Akinobu Mita Date: Fri Jul 25 01:48:24 2008 -0700 dcdbas: use memory_read_from_buffer() Signed-off-by: Akinobu Mita Cc: Doug Warzecha Cc: Zhang Rui Cc: Matt Domsch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f37e66173e0cc09b4e5a89eb0294abbefc15f435 Author: Akinobu Mita Date: Fri Jul 25 01:48:23 2008 -0700 firmware: use memory_read_from_buffer() Signed-off-by: Akinobu Mita Cc: Greg Kroah-Hartman Cc: Markus Rechberger Cc: Kay Sievers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec905a18656daa4d9300bad2bebc02d5dba7883d Author: Jiri Slaby Date: Fri Jul 25 01:48:23 2008 -0700 drivers/misc/phantom: note PCI Tell users that the driver is only for PCI devices to stop asking for support of firewire and parallel devices. Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ace7dd96695769f9d76980c7e52139e73228221c Author: Jiri Slaby Date: Fri Jul 25 01:48:22 2008 -0700 Char: mxser, various cleanups - remove unused macro - some whitespace cleanup - useless debug prints removal Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1df0092477b8b2df605812e298624f5c35bb4805 Author: Jiri Slaby Date: Fri Jul 25 01:48:22 2008 -0700 Char: mxser, remove predefined isa support Remove a support of ISA addresses predefined at compile time. It is unused (filled by zeroes) and prolongs the code. Don't initialize global array and add `ioaddr' module param description. Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83766bc63f7e49b0215811026e7802bd09a9c7e1 Author: Jiri Slaby Date: Fri Jul 25 01:48:21 2008 -0700 Char: mxser, prints cleanup - use dev_* for printing in pci probe function - move ISA p[rints directly into isa find function, do not postpone it. Remove macros bound to it then. - prepend some prints by "mxser: " to know what it belongs to Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 729f0edbecd0c59c82ee9bf92009acc7e984c425 Author: Jiri Slaby Date: Fri Jul 25 01:48:20 2008 -0700 Char: mxser, update documentation Update Documentation/moxa-smartio to the later document from the mxser package. Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 72800df9ba3199df02a95b3830c49fbf16ec4a6d Author: Jiri Slaby Date: Fri Jul 25 01:48:20 2008 -0700 Char: mxser, globals cleanup - remove unused mxvar_diagflag - move mxser_msr into the only user/function - GMStatus, hmm, fix race-prone access to it. We need only one instance for real, not MXSER_PORTS. Move it to MOXA_GETMSTATUS ioctl. - mxser_mon_ext, almost the same, but alloc it on heap, since it has more than 2 kilos. - fix indexing, `i' is not the index value, `i * MXSER_PORTS_PER_BOARD + j' is Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 41aee9a121fd0c31ae22dfe57e8f9ee9d6d85c25 Author: Jiri Slaby Date: Fri Jul 25 01:48:19 2008 -0700 Char: mxser, ioctl cleanup - remove break ctl from ioctl handler, it's never reached, since tty_ops->break_ctl is defined (mxser break handling is done in software) - mark MOXA_GET_MAJOR as deprecated - fix TIOCGICOUNT (some retval non-checks of put_user). Use copy_to_user to whole structure instead. Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6ee8928d94841aa764aeaf645ad16daff811dc26 Author: Akinobu Mita Date: Fri Jul 25 01:48:18 2008 -0700 nwflash: use simple_read_from_buffer() Signed-off-by: Akinobu Mita Cc: Russell King Cc: Tim Schmielau Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 236b8756a2b6f90498d45b2c36d43e5372f2d4b8 Author: Alan Cox Date: Fri Jul 25 01:48:17 2008 -0700 dsp56k: BKL pushdown Push the BKL down into the driver ioctl methods Signed-off-by: Alan Cox Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b8e35919653d76e7dceb8d3b8569c4ec1004d546 Author: Alan Cox Date: Fri Jul 25 01:48:17 2008 -0700 ds1302: push down the BKL into the driver ioctl code Signed-off-by: Alan Cox Cc: Jiri Kosina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d535d3e6ad395345750c361bd2b7f1b9429455d Author: Alan Cox Date: Fri Jul 25 01:48:16 2008 -0700 ppdev: wrap ioctl handler in driver and push lock down Signed-off-by: Alan Cox Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e05e9f7c4aeb82eaa23e46b29580ff514590c641 Author: Alan Cox Date: Fri Jul 25 01:48:16 2008 -0700 ixj: push BKL into driver and wrap ioctls Signed-off-by: Alan Cox Cc: Nishanth Aravamudan Cc: Domen Puncer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 11af7478addd34c42999b3b84095903ed9e67038 Author: Alan Cox Date: Fri Jul 25 01:48:15 2008 -0700 sx: push BKL down into the firmware ioctl handler Also fix the capability checking for firmware load. Signed-off-by: Alan Cox Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f6759fdcfd79ff1827fd5d4ddfe876164466d30d Author: Alan Cox Date: Fri Jul 25 01:48:14 2008 -0700 rio: push down the BKL into the firmware ioctl handler TTY side is already done. Signed-off-by: Alan Cox Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 909d145f0decbc4f17955e1fc4122a669a51fbc0 Author: Alan Cox Date: Fri Jul 25 01:48:14 2008 -0700 mwave: ioctl BKL pushdown Push the BKL down to the point it wraps the actual mwave method handlers Signed-off-by: Alan Cox Cc: Eric Sesterhenn Cc: Yani Ioannou Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47be36a24defbd19aea1354c416ec99f291c7ab8 Author: Alan Cox Date: Fri Jul 25 01:48:13 2008 -0700 ip2: push BKL down for the firmware interface (The tty side is already done) Signed-off-by: Alan Cox Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76528a42e2c5199a1208909318a9c9948d25d0b7 Author: Alan Cox Date: Fri Jul 25 01:48:12 2008 -0700 efirtc: push down the BKL Push it down as far as the EFI method calls. Someone who knows EFI can do the other bits. Also fix another wrong unknown ioctl return. Signed-off-by: Alan Cox Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 372572e9b1dcc5e36091199be63766d13e5a8ae0 Author: Adrian Bunk Date: Fri Jul 25 01:48:11 2008 -0700 #if 0 hpet_unregister() This patch #if 0's the unused hpet_unregister(). Signed-off-by: Adrian Bunk Acked-by: Clemens Ladisch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d1e120f695e9bcf01585e052577dc1e099033f9 Author: Adrian Bunk Date: Fri Jul 25 01:48:11 2008 -0700 proper extern for mwave_s_mdd This patch adds a proper extern for mwave_s_mdd in drivers/char/mwave/mwavedd.h Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79885b227740b9c7d3057f2de556f4098d37cc8f Author: Edgar E. Iglesias Date: Fri Jul 25 01:48:10 2008 -0700 elf: use ELF_CORE_EFLAGS for kcore ELF header flags ELF_CORE_EFLAGS is already used by the binfmt_elf coredumper to set correct arch specific ELF header flags on coredumps. Use it for kcore dumps as well. At the moment, this affects the CRIS and the H8300 arch. Signed-off-by: Edgar E. Iglesias Cc: Mikael Starvik Cc: Yoshinori Sato Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7833351b5260b3a58b54a0c2e7065001d986d749 Author: Adrian Bunk Date: Fri Jul 25 01:48:09 2008 -0700 pty: remove unused UNIX98_PTY_COUNT options The h8300 and sparc options somehow survived when the code stopped using CONFIG_UNIX98_PTY_COUNT. Reviewed-by: Robert P. J. Day Signed-off-by: Adrian Bunk Cc: Yoshinori Sato Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9eefe520c814f6f62c5d36a2ddcd3fb99dfdb30e Author: Nadia Derbey Date: Fri Jul 25 01:48:08 2008 -0700 ipc: do not use a negative value to re-enable msgmni automatic recomputing This patch proposes an alternative to the "magical positive-versus-negative number trick" Andrew complained about last week in http://lkml.org/lkml/2008/6/24/418. This had been introduced with the patches that scale msgmni to the amount of lowmem. With these patches, msgmni has a registered notification routine that recomputes msgmni value upon memory add/remove or ipc namespace creation/ removal. When msgmni is changed from user space (i.e. value written to the proc file), that notification routine is unregistered, and the way to make it registered back is to write a negative value into the proc file. This is the "magical positive-versus-negative number trick". To fix this, a new proc file is introduced: /proc/sys/kernel/auto_msgmni. This file acts as ON/OFF for msgmni automatic recomputing. With this patch, the process is the following: 1) kernel boots in "automatic recomputing mode" /proc/sys/kernel/msgmni contains the value that has been computed (depends on lowmem) /proc/sys/kernel/automatic_msgmni contains "1" 2) echo > /proc/sys/kernel/msgmni . sets msg_ctlmni to . de-activates automatic recomputing (i.e. if, say, some memory is added msgmni won't be recomputed anymore) . /proc/sys/kernel/automatic_msgmni now contains "0" 3) echo "0" > /proc/sys/kernel/automatic_msgmni . de-activates msgmni automatic recomputing this has the same effect as 2) except that msg_ctlmni's value stays blocked at its current value) 3) echo "1" > /proc/sys/kernel/automatic_msgmni . recomputes msgmni's value based on the current available memory size and number of ipc namespaces . re-activates automatic recomputing for msgmni. Signed-off-by: Nadia Derbey Cc: Solofo Ramangalahy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1a43f93f0f3bab418800eaccb9e2e3b5427e173 Author: Akinobu Mita Date: Fri Jul 25 01:48:07 2008 -0700 ipc: use simple_read_from_buffer() Also this patch kills unneccesary trailing NULL character. Signed-off-by: Akinobu Mita Cc: Nadia Derbey Cc: Manfred Spraul Cc: Pierre Peiffer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 380af1b33b3ff92df5cda96329b58f5d1b6b5a53 Author: Manfred Spraul Date: Fri Jul 25 01:48:06 2008 -0700 ipc/sem.c: rewrite undo list locking The attached patch: - reverses the locking order of ulp->lock and sem_lock: Previously, it was first ulp->lock, then inside sem_lock. Now it's the other way around. - converts the undo structure to rcu. Benefits: - With the old locking order, IPC_RMID could not kfree the undo structures. The stale entries remained in the linked lists and were released later. - The patch fixes a a race in semtimedop(): if both IPC_RMID and a semget() that recreates exactly the same id happen between find_alloc_undo() and sem_lock, then semtimedop() would access already kfree'd memory. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Manfred Spraul Reviewed-by: Nadia Derbey Cc: Pierre Peiffer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a1193f8ec091cd8fd309cc2982abe4499f6f2b4d Author: Manfred Spraul Date: Fri Jul 25 01:48:06 2008 -0700 ipc/sem.c: convert sem_array.sem_pending to struct list_head sem_array.sem_pending is a double linked list, the attached patch converts it to struct list_head. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Manfred Spraul Reviewed-by: Nadia Derbey Cc: Pierre Peiffer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c0c29d414087f3b021059673c20a7088f5f1fff Author: Manfred Spraul Date: Fri Jul 25 01:48:05 2008 -0700 ipc/sem.c: remove unused entries from struct sem_queue sem_queue.sma and sem_queue.id were never used, the attached patch removes them. Signed-off-by: Manfred Spraul Reviewed-by: Nadia Derbey Cc: Pierre Peiffer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4daa28f6d8f5cda8ea0f55048e3c8811c384cbdd Author: Manfred Spraul Date: Fri Jul 25 01:48:04 2008 -0700 ipc/sem.c: convert undo structures to struct list_head The undo structures contain two linked lists, the attached patch replaces them with generic struct list_head lists. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Manfred Spraul Cc: Nadia Derbey Cc: Pierre Peiffer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 00c2bf85d8febfcfddde63822043462b026134ff Author: Nadia Derbey Date: Fri Jul 25 01:48:03 2008 -0700 ipc: get rid of ipc_lock_down() Remove the ipc_lock_down() routines: they used to call idr_find() locklessly (given that the ipc ids lock was already held), so they are not needed anymore. Signed-off-by: Nadia Derbey Acked-by: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Cc: Pierre Peiffer Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 983bfb7db303cfde56ae5bbf4e0f2f46e38c9576 Author: Nadia Derbey Date: Fri Jul 25 01:48:03 2008 -0700 ipc: call idr_find() without locking in ipc_lock() Call idr_find() locklessly from ipc_lock(), since the idr tree is now RCU protected. Signed-off-by: Nadia Derbey Acked-by: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Cc: Pierre Peiffer Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cf481c20c476ad2c0febdace9ce23f5a4db19582 Author: Nadia Derbey Date: Fri Jul 25 01:48:02 2008 -0700 idr: make idr_remove rcu-safe Introduce the free_layer() routine: it is the one that actually frees memory after a grace period has elapsed. Signed-off-by: Nadia Derbey Reviewed-by: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Cc: Pierre Peiffer Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9c46d6ea5ce138a886c3a0f10a46130afab75f5 Author: Nadia Derbey Date: Fri Jul 25 01:48:01 2008 -0700 idr: make idr_find rcu-safe Make idr_find rcu-safe: it can now be called inside an rcu_read critical section. Signed-off-by: Nadia Derbey Reviewed-by: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Cc: Pierre Peiffer Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3219b3b7456d5cf15ba7b1fe7b1bcf15ce8840e2 Author: Nadia Derbey Date: Fri Jul 25 01:48:00 2008 -0700 idr: make idr_get_new* rcu-safe Make the idr_get_new* routines rcu-safe. Signed-off-by: Nadia Derbey Reviewed-by: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Cc: Pierre Peiffer Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 944ca05c7b4972f2ebf37262e0f4933d178ad6db Author: Nadia Derbey Date: Fri Jul 25 01:47:59 2008 -0700 idr: error checking factorization Do some code factorization in the return code analysis. Signed-off-by: Nadia Derbey Cc: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Cc: Pierre Peiffer Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f098ad655f4dd8e3da98ffbeda9cedcc4459c01a Author: Nadia Derbey Date: Fri Jul 25 01:47:59 2008 -0700 idr: fix a printk call Fix the incomplete printk call. Signed-off-by: Nadia Derbey Reviewed-by: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Cc: Pierre Peiffer Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ae537892ab9858f71c78701f4651ad1ca531a1b Author: Nadia Derbey Date: Fri Jul 25 01:47:58 2008 -0700 idr: rename some of the idr APIs internal routines This is a trivial patch that renames: . alloc_layer to get_from_free_list since it idr_pre_get that actually allocates memory. . free_layer to move_to_free_list since memory is not actually freed there. This makes things more clear for the next patches. Signed-off-by: Nadia Derbey Reviewed-by: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Cc: Pierre Peiffer Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2027d1abc25ff770cc3bc936abd33570ce85d85a Author: Nadia Derbey Date: Fri Jul 25 01:47:57 2008 -0700 idr: change the idr structure After scalability problems have been detected when using the sysV ipcs, I have proposed to use an RCU based implementation of the IDR api instead (see threads http://lkml.org/lkml/2008/4/11/212 and http://lkml.org/lkml/2008/4/29/295). This resulted in many people asking to convert the idr API and make it rcu safe (because most of the code was duplicated and thus unmaintanable and unreviewable). So here is a first attempt. The important change wrt to the idr API itself is during idr removes: idr layers are freed after a grace period, instead of being moved to the free list. The important change wrt to ipcs, is that idr_find() can now be called locklessly inside a rcu read critical section. Here are the results I've got for the pmsg test sent by Manfred: 2.6.25-rc3-mm1 2.6.25-rc3-mm1+ 2.6.25-mm1 Patched 2.6.25-mm1 1 1168441 1064021 876000 947488 2 1094264 921059 1549592 1730685 3 2082520 1738165 1694370 2324880 4 2079929 1695521 404553 2400408 5 2898758 406566 391283 3246580 6 2921417 261275 263249 3752148 7 3308761 126056 191742 4243142 8 3329456 100129 141722 4275780 1st column: stock 2.6.25-rc3-mm1 2nd column: 2.6.25-rc3-mm1 + ipc patches (store ipcs into idrs) 3nd column: stock 2.6.25-mm1 4th column: 2.6.25-mm1 + this pacth series. This patch: Add an rcu_head to the idr_layer structure in order to free it after a grace period. Signed-off-by: Nadia Derbey Reviewed-by: "Paul E. McKenney" Cc: Manfred Spraul Cc: Jim Houston Cc: Pierre Peiffer Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95b68dec0d52c7b8fea3698b3938cf3ab936436b Author: Chandru Date: Fri Jul 25 01:47:55 2008 -0700 calgary iommu: use the first kernels TCE tables in kdump kdump kernel fails to boot with calgary iommu and aacraid driver on a x366 box. The ongoing dma's of aacraid from the first kernel continue to exist until the driver is loaded in the kdump kernel. Calgary is initialized prior to aacraid and creation of new tce tables causes wrong dma's to occur. Here we try to get the tce tables of the first kernel in kdump kernel and use them. While in the kdump kernel we do not allocate new tce tables but instead read the base address register contents of calgary iommu and use the tables that the registers point to. With these changes the kdump kernel and hence aacraid now boots normally. Signed-off-by: Chandru Siddalingappa Acked-by: Muli Ben-Yehuda Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8448502cfc915f70e3f8923849ade27d472044cb Author: Oleg Nesterov Date: Fri Jul 25 01:47:54 2008 -0700 workqueues: do CPU_UP_CANCELED if CPU_UP_PREPARE fails The bug was pointed out by Akinobu Mita , and this patch is based on his original patch. workqueue_cpu_callback(CPU_UP_PREPARE) expects that if it returns NOTIFY_BAD, _cpu_up() will send CPU_UP_CANCELED then. However, this is not true since "cpu hotplug: cpu: deliver CPU_UP_CANCELED only to NOTIFY_OKed callbacks with CPU_UP_PREPARE" commit: a0d8cdb652d35af9319a9e0fb7134de2a276c636 The callback which has returned NOTIFY_BAD will not receive CPU_UP_CANCELED. Change the code to fulfil the CPU_UP_CANCELED logic if CPU_UP_PREPARE fails. Signed-off-by: Oleg Nesterov Reported-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8de6d308bab4f67fcf953562f9f08f9527cad72d Author: Oleg Nesterov Date: Fri Jul 25 01:47:53 2008 -0700 workqueues: schedule_on_each_cpu() can use schedule_work_on() schedule_on_each_cpu() can use schedule_work_on() to avoid the code duplication. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef1ca236b8d645349ed6569598ae3f6c1b9511c0 Author: Oleg Nesterov Date: Fri Jul 25 01:47:53 2008 -0700 workqueues: queue_work() can use queue_work_on() queue_work() can use queue_work_on() to avoid the code duplication. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a67da70dc0955580665f5444f318b92e69a3c272 Author: Oleg Nesterov Date: Fri Jul 25 01:47:52 2008 -0700 workqueues: lockdep annotations for flush_work() Add lockdep annotations to flush_work() and update the comment. Signed-off-by: Oleg Nesterov Cc: Jarek Poplawski Acked-by: Johannes Berg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69b895fd13d73aebf62b75502eb6513d43057ba3 Author: Oleg Nesterov Date: Fri Jul 25 01:47:51 2008 -0700 S390 topology: don't use kthread() for arch_reinit_sched_domains() Now that it is safe to use get_online_cpus() we can revert [S390] cpu topology: Fix possible deadlock. commit: fd781fa25c9e9c6fd1599df060b05e7c4ad724e5 and call arch_reinit_sched_domains() directly from topology_work_fn(). Signed-off-by: Oleg Nesterov Cc: Gautham R Shenoy Tested-by: Heiko Carstens Cc: Max Krasnyansky Cc: Paul Jackson Cc: Paul Menage Cc: Peter Zijlstra Cc: Vegard Nossum Cc: Martin Schwidefsky Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3da1c84c00c7e5fa8348336bd8c342f9128b0f14 Author: Oleg Nesterov Date: Fri Jul 25 01:47:50 2008 -0700 workqueues: make get_online_cpus() useable for work->func() workqueue_cpu_callback(CPU_DEAD) flushes cwq->thread under cpu_maps_update_begin(). This means that the multithreaded workqueues can't use get_online_cpus() due to the possible deadlock, very bad and very old problem. Introduce the new state, CPU_POST_DEAD, which is called after cpu_hotplug_done() but before cpu_maps_update_done(). Change workqueue_cpu_callback() to use CPU_POST_DEAD instead of CPU_DEAD. This means that create/destroy functions can't rely on get_online_cpus() any longer and should take cpu_add_remove_lock instead. [akpm@linux-foundation.org: fix CONFIG_SMP=n] Signed-off-by: Oleg Nesterov Acked-by: Gautham R Shenoy Cc: Heiko Carstens Cc: Max Krasnyansky Cc: Paul Jackson Cc: Paul Menage Cc: Peter Zijlstra Cc: Vegard Nossum Cc: Martin Schwidefsky Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8616a89ab761239c963eea3a63be383f127cc7e8 Author: Oleg Nesterov Date: Fri Jul 25 01:47:49 2008 -0700 workqueues: schedule_on_each_cpu: use flush_work() Change schedule_on_each_cpu() to use flush_work() instead of flush_workqueue(), this way we don't wait for other work_struct's which can be queued meanwhile. Signed-off-by: Oleg Nesterov Cc: Jarek Poplawski Cc: Max Krasnyansky Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db700897224b5ebdf852f2d38920ce428940d059 Author: Oleg Nesterov Date: Fri Jul 25 01:47:49 2008 -0700 workqueues: implement flush_work() Most of users of flush_workqueue() can be changed to use cancel_work_sync(), but sometimes we really need to wait for the completion and cancelling is not an option. schedule_on_each_cpu() is good example. Add the new helper, flush_work(work), which waits for the completion of the specific work_struct. More precisely, it "flushes" the result of of the last queue_work() which is visible to the caller. For example, this code queue_work(wq, work); /* WINDOW */ queue_work(wq, work); flush_work(work); doesn't necessary work "as expected". What can happen in the WINDOW above is - wq starts the execution of work->func() - the caller migrates to another CPU now, after the 2nd queue_work() this work is active on the previous CPU, and at the same time it is queued on another. In this case flush_work(work) may return before the first work->func() completes. It is trivial to add another helper int flush_work_sync(struct work_struct *work) { return flush_work(work) || wait_on_work(work); } which works "more correctly", but it has to iterate over all CPUs and thus it much slower than flush_work(). Signed-off-by: Oleg Nesterov Acked-by: Max Krasnyansky Acked-by: Jarek Poplawski Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a4d9b0aa0d3c50314e57525a5e5ec2cfc48b4c8 Author: Oleg Nesterov Date: Fri Jul 25 01:47:47 2008 -0700 workqueues: insert_work: use "list_head *" instead of "int tail" insert_work() inserts the new work_struct before or after cwq->worklist, depending on the "int tail" parameter. Change it to accept "list_head *" instead, this shrinks .text a bit and allows us to insert the barrier after specific work_struct. Signed-off-by: Oleg Nesterov Cc: Jarek Poplawski Cc: Max Krasnyansky Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 565b9b14e7f48131bca58840aa404bbef058fa89 Author: Oleg Nesterov Date: Fri Jul 25 01:47:47 2008 -0700 coredump: format_corename: fix the "core_uses_pid" logic I don't understand why the multi-thread coredump implies the core_uses_pid behaviour, but we shouldn't use mm->mm_users for that. This counter can be incremented by get_task_mm(). Use the valued returned by coredump_wait() instead. Also, remove the "const char *pattern" argument, format_corename() can use core_pattern directly. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Oleg Nesterov Cc: Roland McGrath Cc: Alan Cox Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a94e2d408eaedbd85aae259621d46fafc10479a2 Author: Oleg Nesterov Date: Fri Jul 25 01:47:46 2008 -0700 coredump: kill mm->core_done Now that we have core_state->dumper list we can use it to wake up the sub-threads waiting for the coredump completion. This uglifies the code and .text grows by 47 bytes, but otoh mm_struct lessens by sizeof(struct completion). Also, with this change we can decouple exit_mm() from the coredumping code. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 182c515fd2a942623aed4e4e0e0b37fe96571b05 Author: Oleg Nesterov Date: Fri Jul 25 01:47:45 2008 -0700 coredump: elf_fdpic_core_dump: use core_state->dumper list Kill the nasty rcu_read_lock() + do_each_thread() loop, use the list encoded in mm->core_state instead, s/GFP_ATOMIC/GFP_KERNEL/. This patch allows futher cleanups in binfmt_elf_fdpic.c. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83914441f94c6f2cd468ca97365f6c34f418706e Author: Oleg Nesterov Date: Fri Jul 25 01:47:45 2008 -0700 coredump: elf_core_dump: use core_state->dumper list Kill the nasty rcu_read_lock() + do_each_thread() loop, use the list encoded in mm->core_state instead, s/GFP_ATOMIC/GFP_KERNEL/. This patch allows futher cleanups in binfmt_elf.c, in particular we can kill the parallel info->threads list. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b564daf806d492dd4f7afe9b6c83b8d35d137669 Author: Oleg Nesterov Date: Fri Jul 25 01:47:44 2008 -0700 coredump: construct the list of coredumping threads at startup time binfmt->core_dump() has to iterate over the all threads in system in order to find the coredumping threads and construct the list using the GFP_ATOMIC allocations. With this patch each thread allocates the list node on exit_mm()'s stack and adds itself to the list. This allows us to do further changes: - simplify ->core_dump() - change exit_mm() to clear ->mm first, then wait for ->core_done. this makes the coredumping process visible to oom_kill - kill mm->core_done Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d5b327bf198d2720666de958dcc2ae219d86952 Author: Oleg Nesterov Date: Fri Jul 25 01:47:43 2008 -0700 coredump: make mm->core_state visible to ->core_dump() Move the "struct core_state core_state" from coredump_wait() to do_coredump(), this makes mm->core_state visible to binfmt->core_dump(). Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5f1cc8c1828486a61ab3e575da6e2c62b34d399 Author: Oleg Nesterov Date: Fri Jul 25 01:47:42 2008 -0700 coredump: turn core_state->nr_threads into atomic_t Turn core_state->nr_threads into atomic_t and kill now unneeded down_write(&mm->mmap_sem) in exit_mm(). Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8cd9c249128a59e8e833d454a784b0cbd338d468 Author: Oleg Nesterov Date: Fri Jul 25 01:47:42 2008 -0700 coredump: simplify core_state->nr_threads calculation Change zap_process() to return int instead of incrementing mm->core_state->nr_threads directly. Change zap_threads() to set mm->core_state only on success. This patch restores the original size of .text, and more importantly now ->nr_threads is used in two places only. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 999d9fc1670bc082928b93b11d1f2e0e417d973c Author: Oleg Nesterov Date: Fri Jul 25 01:47:41 2008 -0700 coredump: move mm->core_waiters into struct core_state Move mm->core_waiters into "struct core_state" allocated on stack. This shrinks mm_struct a little bit and allows further changes. This patch mostly does s/core_waiters/core_state. The only essential change is that coredump_wait() must clear mm->core_state before return. The coredump_wait()'s path is uglified and .text grows by 30 bytes, this is fixed by the next patch. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 32ecb1f26dd50eeaac4e3f4dea4541c97848e459 Author: Oleg Nesterov Date: Fri Jul 25 01:47:41 2008 -0700 coredump: turn mm->core_startup_done into the pointer to struct core_state mm->core_startup_done points to "struct completion startup_done" allocated on the coredump_wait()'s stack. Introduce the new structure, core_state, which holds this "struct completion". This way we can add more info visible to the threads participating in coredump without enlarging mm_struct. No changes in affected .o files. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 24d5288f06ed8b3a368eba967d587cdb012dfdf7 Author: Oleg Nesterov Date: Fri Jul 25 01:47:40 2008 -0700 coredump: elf_core_dump: skip kernel threads linux_binfmt->core_dump() runs before the process does exit_aio(), this means that we can hit the kernel thread which shares the same ->mm. Afaics, nothing really bad can happen, but perhaps it makes sense to fix this minor bug. It is sad we have to iterate over all threads in system and use GFP_ATOMIC. Hopefully we can kill theses ugly do_each_thread()s, but this needs some nontrivial changes in mm_struct and do_coredump. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 15b9f360c0316c06d37c09b02d85565edbaf9dd3 Author: Oleg Nesterov Date: Fri Jul 25 01:47:39 2008 -0700 coredump: zap_threads() must skip kernel threads The main loop in zap_threads() must skip kthreads which may use the same mm. Otherwise we "kill" this thread erroneously (for example, it can not fork or exec after that), and the coredumping task stucks in the TASK_UNINTERRUPTIBLE state forever because of the wrong ->core_waiters count. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 246bb0b1deb29726990620d8b5e55ca29f331362 Author: Oleg Nesterov Date: Fri Jul 25 01:47:38 2008 -0700 kill PF_BORROWED_MM in favour of PF_KTHREAD Kill PF_BORROWED_MM. Change use_mm/unuse_mm to not play with ->flags, and do s/PF_BORROWED_MM/PF_KTHREAD/ for a couple of other users. No functional changes yet. But this allows us to do further fixes/cleanups. oom_kill/ptrace/etc often check "p->mm != NULL" to filter out the kthreads, this is wrong because of use_mm(). The problem with PF_BORROWED_MM is that we need task_lock() to avoid races. With this patch we can check PF_KTHREAD directly, or use a simple lockless helper: /* The result must not be dereferenced !!! */ struct mm_struct *__get_task_mm(struct task_struct *tsk) { if (tsk->flags & PF_KTHREAD) return NULL; return tsk->mm; } Note also ecard_task(). It runs with ->mm != NULL, but it's the kernel thread without PF_BORROWED_MM. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7b34e4283c685f5cc6ba6d30e939906eee0d4bcf Author: Oleg Nesterov Date: Fri Jul 25 01:47:37 2008 -0700 introduce PF_KTHREAD flag Introduce the new PF_KTHREAD flag to mark the kernel threads. It is set by INIT_TASK() and copied to the forked childs (we could set it in kthreadd() along with PF_NOFREEZE instead). daemonize() was changed as well. In that case testing of PF_KTHREAD is racy, but daemonize() is hopeless anyway. This flag is cleared in do_execve(), before search_binary_handler(). Probably not the best place, we can do this in exec_mmap() or in start_thread(), or clear it along with PF_FORKNOEXEC. But I think this doesn't matter in practice, and if do_execve() fails kthread should die soon. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d749b9e676b26584a47e75c235aa6f69d0697ae Author: Oleg Nesterov Date: Fri Jul 25 01:47:37 2008 -0700 ptrace: simplify ptrace_stop()->sigkill_pending() path 1. SIGKILL can't be blocked, remove this check from sigkill_pending(). 2. When ptrace_stop() sees sigkill_pending() == T, it can just return. Kill "int killed" and simplify the code. This also is more correct, the tracer shouldn't see us in TASK_TRACED if we are not going to stop. I strongly believe this code needs further changes. We should do the "was this task killed" check unconditionally, currently it depends on arch_ptrace_stop_needed(). On the other hand, sigkill_pending() isn't very clever. If the task was killed tkill(SIGKILL), the signal can be already dequeued if the caller is do_exit(). Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 364d3c13c17f45da6d638011078d4c4d3070d719 Author: Oleg Nesterov Date: Fri Jul 25 01:47:36 2008 -0700 ptrace: give more respect to SIGKILL ptrace_stop() has some complicated checks to prevent the scheduling in the TASK_TRACED state with the pending SIGKILL, but these checks are racy, and they depend on arch_ptrace_stop_needed(). This patch assumes that the traced task should die asap if it was killed by SIGKILL, in that case schedule()->signal_pending_state() has no reason to ignore the TASK_WAKEKILL part of TASK_TRACED, and we can kill this nasty special case. Note: do_exit()->ptrace_notify() is special, the killed task can already dequeue SIGKILL at this point. Another indication that fatal_signal_pending() is not exactly right. Signed-off-by: Oleg Nesterov Cc: Ingo Molnar Cc: Matthew Wilcox Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f22ab814a24e654b1de24db0c5f8b57b5ab2026a Author: Adrian Bunk Date: Fri Jul 25 01:47:34 2008 -0700 include/asm/ptrace.h userspace headers cleanup This patch contains the following cleanups for the asm/ptrace.h userspace headers: - include/asm-generic/Kbuild.asm already lists ptrace.h, remove the superfluous listings in the Kbuild files of the following architectures: - cris - frv - powerpc - x86 - don't expose function prototypes and macros to userspace: - arm - blackfin - cris - mn10300 - parisc - remove #ifdef CONFIG_'s around #define's: - blackfin - m68knommu - sh: AFAIK __SH5__ should work in both kernel and userspace, no need to leak CONFIG_SUPERH64 to userspace - xtensa: cosmetical change to remove empty #ifndef __ASSEMBLY__ #else #endif from the userspace headers Not changed by this patch is the fact that the following architectures have a different struct pt_regs depending on CONFIG_ variables: - h8300 - m68knommu - mips This does not work in userspace. Signed-off-by: Adrian Bunk Cc: Cc: Roland McGrath Cc: Oleg Nesterov Acked-by: Greg Ungerer Acked-by: Paul Mundt Acked-by: Grant Grundler Acked-by: Jesper Nilsson Acked-by: Chris Zankel Acked-by: David Howells Acked-by: Paul Mackerras Acked-by: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc64efd220dcd4449aef8dd2564d73127b583b09 Author: Gustavo Fernando Padovan Date: Fri Jul 25 01:47:33 2008 -0700 kernel/signal.c: change vars pid and tgid types to pid_t Change the type of pid and tgid variables from int to the POSIX type pid_t. Signed-off-by: Gustavo F. Padovan Cc: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8878ba3f05ae5bbfad5a6e72e5121c0ea35f989 Author: Michael Kerrisk Date: Fri Jul 25 01:47:32 2008 -0700 signals: make siginfo_t si_utime + si_sstime report times in USER_HZ, not HZ In the switch to configurable HZ in 2.6, the treatment of the si_utime and si_stime fields that are exposed to userland via the siginfo structure looks to have been botched. As things stand, these fields report times in units of HZ, so that userland gets information that varies depending on the HZ that the kernel was configured with. This patch changes the reported values to use USER_HZ units. Signed-off-by: Michael Kerrisk Acked-by: Oleg Nesterov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e4901f92a8dbe843e76651a50f7a2a6dd3d53474 Author: Oleg Nesterov Date: Fri Jul 25 01:47:31 2008 -0700 coredump: zap_threads: comments && use while_each_thread() No changes in fs/exec.o The for_each_process() loop in zap_threads() is very subtle, it is not clear why we don't race with fork/exit/exec. Add the fat comment. Also, change the code to use while_each_thread(). Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b201a9eddf509e8e935b45e573648e36f4b623f Author: Oleg Nesterov Date: Fri Jul 25 01:47:31 2008 -0700 signals: do_signal_stop: kill the SIGNAL_UNKILLABLE check fae5fa44f1fd079ffbed8e0add929dd7bbd1347f changed do_signal_stop() to check SIGNAL_UNKILLABLE, this wasn't needed. If signal_group_exit() == F, the signal sent to SIGNAL_UNKILLABLE task must be already filtered out by the caller, get_signal_to_deliver(). And if signal_group_exit() == T we are not going to stop. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 92413d771e7123304fb4b9efd2a00cccc946e383 Author: Oleg Nesterov Date: Fri Jul 25 01:47:30 2008 -0700 signals: dequeue_signal: don't check SIGNAL_GROUP_EXIT when setting SIGNAL_STOP_DEQUEUED dequeue_signal() checks SIGNAL_GROUP_EXIT before setting SIGNAL_STOP_DEQUEUED. This was added by 788e05a67c343fa22f2ae1d3ca264e7f15c25eaf a long ago to avoid the coredump/SIGSTOP race. Since then the related code was changed, and now this subtle check is both incomplete and unneeded at the same time. It is incomplete because nowadays exec() doesn't set SIGNAL_GROUP_EXIT, so in fact we should check signal_group_exit() to avoid a similar race. Fortunately, we doesn't need the check at all. The only function which relies on SIGNAL_STOP_DEQUEUED is do_signal_stop(), and it ignores this flag if signal_group_exit() == T, this covers the SIGNAL_GROUP_EXIT case. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3854a771821c970065e3203a0b40ddc4101538cc Author: Oleg Nesterov Date: Fri Jul 25 01:47:29 2008 -0700 __exit_signal: don't take rcu lock There is no reason for rcu_read_lock() in __exit_signal(). tsk->sighand can only be changed if tsk does exec, obviously this is not possible. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 100360f03077663b7bef3af44805b6cf700c3bee Author: Oleg Nesterov Date: Fri Jul 25 01:47:29 2008 -0700 signals: change collect_signal() to return void With the recent changes collect_signal() always returns true. Change it to return void and update the single caller. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d4434207616980885205c605697868c0f07e4378 Author: Oleg Nesterov Date: Fri Jul 25 01:47:28 2008 -0700 signals: collect_signal: simplify the "still_pending" logic Factor out sigdelset() calls and remove the "still_pending" variable. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6715ca451cfff1c9ce4b33ad9918a1dacf43997c Author: Oleg Nesterov Date: Fri Jul 25 01:47:27 2008 -0700 signals: collect_signal: remove the unneeded sigismember() check collect_signal() checks sigismember(&list->signal, sig), this is not needed. This "sig" was just found by next_signal(), so it must be valid. We have a (completely broken) call to ->notifier in between, but it must not play with sigpending->signal bits or unlock ->siglock. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 96347e7759e2e433c427defa0fa1adfc8cce6226 Author: Oleg Nesterov Date: Fri Jul 25 01:47:27 2008 -0700 posix timers: release_posix_timer: kill the bogus put_task_struct(->it_process); release_posix_timer() can't be called with ->it_process != NULL. Once sys_timer_create() sets ->it_process it must not call release_posix_timer(), otherwise we can race with another thread doing sys_timer_delete(), this timer is visible to idr_find() and unlocked. The same is true for two other callers (actually, for any possible caller), sys_timer_delete() and itimer_delete(). They must clear ->it_process before unlock_timer() + release_posix_timer(). Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Cc: john stultz Cc: Thomas Gleixner Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4b7a1304267bff68260ae861784b27130e805be3 Author: Oleg Nesterov Date: Fri Jul 25 01:47:26 2008 -0700 posix timers: timer_delete: remove the bogus "->it_process != NULL" check sys_timer_delete() and itimer_delete() check "timer->it_process != NULL", this looks completely bogus. ->it_process == NULL means that this timer is already under destruction or it is not fully initialized, this must not happen. sys_timer_delete: the timer is locked, and lock_timer() can't succeed if ->it_process == NULL. itimer_delete: it is called by exit_itimers() when there are no other threads which can play with signal_struct->posix_timers. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Cc: john stultz Cc: Thomas Gleixner Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da5ef6bb96158b0fc0d808704237a453af449124 Author: Lai Jiangshan Date: Fri Jul 25 01:47:25 2008 -0700 cpuset: two minor code-cleanups In cpuset_update_task_memory_state() local variable struct task_struct *tsk = current; And local variable tsk is used 14 times and statement task_cs(tsk) is used twice in this function. So using task_cs(tsk) instead of task_cs(current) is better for readability. And "(struct cgroup_scanner *)&scan" is not good for readability also. (and "container_of" is used in cpuset_do_move_task(), not "(cpuset_hotplug_scanner *)scan") Signed-off-by: Lai Jiangshan Acked-by: Paul Menage Cc: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 02412483777651a26b19a75e49c2a451a174ca9c Author: Lai Jiangshan Date: Fri Jul 25 01:47:24 2008 -0700 cpuset: code-cleanup for started_after cgroup(cgroup_scan_tasks) will initialize heap->gt for us. This patch removes started_after() and its helper-function. Signed-off-by: Lai Jiangshan Acked-by: Paul Menage Cc: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 489a5393a20dcbf91104052120eb2eff8791b61b Author: Lai Jiangshan Date: Fri Jul 25 01:47:23 2008 -0700 cpuset: don't pass empty cpumasks to partition_sched_domains() I create lots of empty cpusets(empty cpumasks) and turn off the "sched_load_balance" in top cpuset. I found that all these empty cpumasks are passed to partition_sched_domains() in rebuild_sched_domains(), it's very time-consuming for partition_sched_domains() and it's not need. It also reduce memory consumed and some works in rebuild_sched_domains() too. Signed-off-by: Lai Jiangshan Acked-by: Paul Menage Cc: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c372e817afc629fea9ff6321313325ed0b4a855b Author: Li Zefan Date: Fri Jul 25 01:47:23 2008 -0700 cpuset: avoid unnecessary sched domains rebuilding When changing 'sched_relax_domain_level', don't rebuild sched domains if 'cpus' is empty or 'sched_load_balance' is not set. Also make the comments of rebuild_sched_domains() more readable. Signed-off-by: Li Zefan Cc: Hidetoshi Seto Cc: Paul Jackson Cc: Paul Menage Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9b4fb8dabf38fb456c97f01aace07cb6e7c1723 Author: Miao Xie Date: Fri Jul 25 01:47:22 2008 -0700 cpusets: update task's cpus_allowed and mems_allowed after CPU/NODE offline/online The bug is that a task may run on the cpu/node which is not in its cpuset.cpus/ cpuset.mems. It can be reproduced by the following commands: ----------------------------------- # mkdir /dev/cpuset # mount -t cpuset xxx /dev/cpuset # mkdir /dev/cpuset/0 # echo 0-1 > /dev/cpuset/0/cpus # echo 0 > /dev/cpuset/0/mems # echo $$ > /dev/cpuset/0/tasks # echo 0 > /sys/devices/system/cpu/cpu1/online # echo 1 > /sys/devices/system/cpu/cpu1/online ----------------------------------- There is only CPU0 in cpuset.cpus, but the task in this cpuset runs on both CPU0 and CPU1. It is because the task's cpu_allowed didn't get updated after we did CPU offline/online manipulation. Similar for mem_allowed. This patch fixes this bug expect for root cpuset. Because there is a problem about root cpuset, in that whether it is necessary to update all the tasks in root cpuset or not after cpu/node offline/online. If updating, some kernel threads which is bound into a specified cpu will be unbound. If not updating, there is a bug in root cpuset. This bug is also caused by offline/online manipulation. For example, there is a dual-cpu machine. we create a sub cpuset in root cpuset and assign 1 to its cpus. And then we attach some tasks into this sub cpuset. After this, we offline CPU1. Now, the tasks in this new cpuset are moved into root cpuset automatically because there is no cpu in sub cpuset. Then we online CPU1, we find all the tasks which doesn't belong to root cpuset originally just run on CPU0. Maybe we need to add a flag in the task_struct to mark which task can't be unbound? Signed-off-by: Miao Xie Acked-by: Paul Jackson Cc: Li Zefan Cc: Paul Jackson Cc: Paul Menage Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b2f630a28d53b5a2082a5275bc3334b10373508 Author: Miao Xie Date: Fri Jul 25 01:47:21 2008 -0700 cpusets: restructure the function update_cpumask() and update_nodemask() Extract two functions from update_cpumask() and update_nodemask().They will be used later for updating tasks' cpus_allowed and mems_allowed after CPU/NODE offline/online. [lizf@cn.fujitsu.com: build fix] Signed-off-by: Miao Xie Acked-by: Paul Jackson Cc: David Rientjes Cc: Li Zefan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 628f42355389cfb596ca3a5a5f64fb9054a2a06a Author: KAMEZAWA Hiroyuki Date: Fri Jul 25 01:47:20 2008 -0700 memcg: limit change shrink usage Shrinking memory usage at limit change. [akpm@linux-foundation.org: coding-style fixes] Acked-by: Balbir Singh Acked-by: Pavel Emelyanov Signed-off-by: KAMEZAWA Hiroyuki Cc: Paul Menage Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12b9804419cfb1c1bdac413f6c373af3b88d154b Author: KAMEZAWA Hiroyuki Date: Fri Jul 25 01:47:19 2008 -0700 res_counter: limit change support ebusy Add an interface to set limit. This is necessary to memory resource controller because it shrinks usage at set limit. Other controllers may not need this interface to shrink usage because shrinking is not necessary or impossible. Acked-by: Balbir Singh Acked-by: Pavel Emelyanov Signed-off-by: KAMEZAWA Hiroyuki Cc: Paul Menage Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cede86acd8bd5d2205dec28db8ac86410a3a19e8 Author: Li Zefan Date: Fri Jul 25 01:47:18 2008 -0700 memcg: clean up checking of the disabled flag Those checks are unnecessary, because when the subsystem is disabled it can't be mounted, so those functions won't get called. The check is needed in functions which will be called in other places except cgroup. [hugh@veritas.com: further checking of disabled flag] Signed-off-by: Li Zefan Acked-by: Balbir Singh Acked-by: KAMEZAWA Hiroyuki Acked-by: KOSAKI Motohiro Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit accf163e6ab729f1fc5fffaa0310e498270bf4e7 Author: KAMEZAWA Hiroyuki Date: Fri Jul 25 01:47:17 2008 -0700 memcg: remove a redundant check Because of remove refcnt patch, it's very rare case to that mem_cgroup_charge_common() is called against a page which is accounted. mem_cgroup_charge_common() is called when. 1. a page is added into file cache. 2. an anon page is _newly_ mapped. A racy case is that a newly-swapped-in anonymous page is referred from prural threads in do_swap_page() at the same time. (a page is not Locked when mem_cgroup_charge() is called from do_swap_page.) Another case is shmem. It charges its page before calling add_to_page_cache(). Then, mem_cgroup_charge_cache() is called twice. This case is handled in mem_cgroup_cache_charge(). But this check may be too hacky... Signed-off-by : KAMEZAWA Hiroyuki Cc: Balbir Singh Cc: "Eric W. Biederman" Cc: Pavel Emelyanov Cc: Li Zefan Cc: Hugh Dickins Cc: YAMAMOTO Takashi Cc: Paul Menage Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b76734e5e34e1889ab9fc5f3756570b1129f0f50 Author: KAMEZAWA Hiroyuki Date: Fri Jul 25 01:47:16 2008 -0700 memcg: add hints for branch Showing brach direction for obvious conditions. Signed-off-by: KAMEZAWA Hiroyuki Cc: Balbir Singh Cc: "Eric W. Biederman" Cc: Pavel Emelyanov Cc: Li Zefan Cc: Hugh Dickins Cc: YAMAMOTO Takashi Cc: Paul Menage Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c9b0ed51483cc2fc42bb801b6675c4231b0e4634 Author: KAMEZAWA Hiroyuki Date: Fri Jul 25 01:47:15 2008 -0700 memcg: helper function for relcaim from shmem. A new call, mem_cgroup_shrink_usage() is added for shmem handling and relacing non-standard usage of mem_cgroup_charge/uncharge. Now, shmem calls mem_cgroup_charge() just for reclaim some pages from mem_cgroup. In general, shmem is used by some process group and not for global resource (like file caches). So, it's reasonable to reclaim pages from mem_cgroup where shmem is mainly used. [hugh@veritas.com: shmem_getpage release page sooner] [hugh@veritas.com: mem_cgroup_shrink_usage css_put] Signed-off-by: KAMEZAWA Hiroyuki Cc: Balbir Singh Cc: "Eric W. Biederman" Cc: Pavel Emelyanov Cc: Li Zefan Cc: YAMAMOTO Takashi Cc: Paul Menage Cc: David Rientjes Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69029cd550284e32de13d6dd2f77b723c8a0e444 Author: KAMEZAWA Hiroyuki Date: Fri Jul 25 01:47:14 2008 -0700 memcg: remove refcnt from page_cgroup memcg: performance improvements Patch Description 1/5 ... remove refcnt fron page_cgroup patch (shmem handling is fixed) 2/5 ... swapcache handling patch 3/5 ... add helper function for shmem's memory reclaim patch 4/5 ... optimize by likely/unlikely ppatch 5/5 ... remove redundunt check patch (shmem handling is fixed.) Unix bench result. == 2.6.26-rc2-mm1 + memory resource controller Execl Throughput 2915.4 lps (29.6 secs, 3 samples) C Compiler Throughput 1019.3 lpm (60.0 secs, 3 samples) Shell Scripts (1 concurrent) 5796.0 lpm (60.0 secs, 3 samples) Shell Scripts (8 concurrent) 1097.7 lpm (60.0 secs, 3 samples) Shell Scripts (16 concurrent) 565.3 lpm (60.0 secs, 3 samples) File Read 1024 bufsize 2000 maxblocks 1022128.0 KBps (30.0 secs, 3 samples) File Write 1024 bufsize 2000 maxblocks 544057.0 KBps (30.0 secs, 3 samples) File Copy 1024 bufsize 2000 maxblocks 346481.0 KBps (30.0 secs, 3 samples) File Read 256 bufsize 500 maxblocks 319325.0 KBps (30.0 secs, 3 samples) File Write 256 bufsize 500 maxblocks 148788.0 KBps (30.0 secs, 3 samples) File Copy 256 bufsize 500 maxblocks 99051.0 KBps (30.0 secs, 3 samples) File Read 4096 bufsize 8000 maxblocks 2058917.0 KBps (30.0 secs, 3 samples) File Write 4096 bufsize 8000 maxblocks 1606109.0 KBps (30.0 secs, 3 samples) File Copy 4096 bufsize 8000 maxblocks 854789.0 KBps (30.0 secs, 3 samples) Dc: sqrt(2) to 99 decimal places 126145.2 lpm (30.0 secs, 3 samples) INDEX VALUES TEST BASELINE RESULT INDEX Execl Throughput 43.0 2915.4 678.0 File Copy 1024 bufsize 2000 maxblocks 3960.0 346481.0 875.0 File Copy 256 bufsize 500 maxblocks 1655.0 99051.0 598.5 File Copy 4096 bufsize 8000 maxblocks 5800.0 854789.0 1473.8 Shell Scripts (8 concurrent) 6.0 1097.7 1829.5 ========= FINAL SCORE 991.3 == 2.6.26-rc2-mm1 + this set == Execl Throughput 3012.9 lps (29.9 secs, 3 samples) C Compiler Throughput 981.0 lpm (60.0 secs, 3 samples) Shell Scripts (1 concurrent) 5872.0 lpm (60.0 secs, 3 samples) Shell Scripts (8 concurrent) 1120.3 lpm (60.0 secs, 3 samples) Shell Scripts (16 concurrent) 578.0 lpm (60.0 secs, 3 samples) File Read 1024 bufsize 2000 maxblocks 1003993.0 KBps (30.0 secs, 3 samples) File Write 1024 bufsize 2000 maxblocks 550452.0 KBps (30.0 secs, 3 samples) File Copy 1024 bufsize 2000 maxblocks 347159.0 KBps (30.0 secs, 3 samples) File Read 256 bufsize 500 maxblocks 314644.0 KBps (30.0 secs, 3 samples) File Write 256 bufsize 500 maxblocks 151852.0 KBps (30.0 secs, 3 samples) File Copy 256 bufsize 500 maxblocks 101000.0 KBps (30.0 secs, 3 samples) File Read 4096 bufsize 8000 maxblocks 2033256.0 KBps (30.0 secs, 3 samples) File Write 4096 bufsize 8000 maxblocks 1611814.0 KBps (30.0 secs, 3 samples) File Copy 4096 bufsize 8000 maxblocks 847979.0 KBps (30.0 secs, 3 samples) Dc: sqrt(2) to 99 decimal places 128148.7 lpm (30.0 secs, 3 samples) INDEX VALUES TEST BASELINE RESULT INDEX Execl Throughput 43.0 3012.9 700.7 File Copy 1024 bufsize 2000 maxblocks 3960.0 347159.0 876.7 File Copy 256 bufsize 500 maxblocks 1655.0 101000.0 610.3 File Copy 4096 bufsize 8000 maxblocks 5800.0 847979.0 1462.0 Shell Scripts (8 concurrent) 6.0 1120.3 1867.2 ========= FINAL SCORE 1004.6 This patch: Remove refcnt from page_cgroup(). After this, * A page is charged only when !page_mapped() && no page_cgroup is assigned. * Anon page is newly mapped. * File page is added to mapping->tree. * A page is uncharged only when * Anon page is fully unmapped. * File page is removed from LRU. There is no change in behavior from user's view. This patch also removes unnecessary calls in rmap.c which was used only for refcnt mangement. [akpm@linux-foundation.org: fix warning] [hugh@veritas.com: fix shmem_unuse_inode charging] Signed-off-by: KAMEZAWA Hiroyuki Cc: Balbir Singh Cc: "Eric W. Biederman" Cc: Pavel Emelyanov Cc: Li Zefan Cc: Hugh Dickins Cc: YAMAMOTO Takashi Cc: Paul Menage Cc: David Rientjes Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8589cc189f96b87348ae83ea4db38eaac624135 Author: KAMEZAWA Hiroyuki Date: Fri Jul 25 01:47:10 2008 -0700 memcg: better migration handling This patch changes page migration under memory controller to use a different algorithm. (thanks to Christoph for new idea.) Before: - page_cgroup is migrated from an old page to a new page. After: - a new page is accounted , no reuse of page_cgroup. Pros: - We can avoid compliated lock depndencies and races in migration. Cons: - new param to mem_cgroup_charge_common(). - mem_cgroup_getref() is added for handling ref_cnt ping-pong. This version simplifies complicated lock dependency in page migraiton under memory resource controller. new refcnt sequence is following. a mapped page: prepage_migration() ..... +1 to NEW page try_to_unmap() ..... all refs to OLD page is gone. move_pages() ..... +1 to NEW page if page cache. remap... ..... all refs from *map* is added to NEW one. end_migration() ..... -1 to New page. page's mapcount + (page_is_cache) refs are added to NEW one. Signed-off-by: KAMEZAWA Hiroyuki Cc: Balbir Singh Cc: Pavel Emelyanov Cc: Li Zefan Cc: YAMAMOTO Takashi Cc: Hugh Dickins Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 508b7be0a5b06b64203512ed9b34191cddc83f56 Author: KAMEZAWA Hiroyuki Date: Fri Jul 25 01:47:09 2008 -0700 memcg: avoid unnecessary initialization * remove over-killing initialization (in fast path) * makeing the condition for PAGE_CGROUP_FLAG_ACTIVE be more obvious. Signed-off-by: KAMEAZAWA Hiroyuki Reviewed-by: Li Zefan Acked-by: Balbir Singh Acked-by: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a181b0e888a1d917edcab57cd73ccf7d8e75a46c Author: KAMEZAWA Hiroyuki Date: Fri Jul 25 01:47:08 2008 -0700 memcg: make global var read_mostly mem_cgroup_subsys and page_cgroup_cache should be read_mostly and MEM_CGROUP_RECLAIM_RETRIES can be just a fixed number. Signed-off-by: KAMEZAWA Hiroyuki Acked-by: Balbir Singh Acked-by: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7759fc9d10d3559f365cb122d81e0c0a185fe0fe Author: Li Zefan Date: Fri Jul 25 01:47:08 2008 -0700 devcgroup: code cleanup - clean up set_majmin() - use simple_strtoul() to parse major/minor [akpm@linux-foundation.org: fix simple_strtoul() usage] [kosaki.motohiro@jp.fujitsu.com: fix warnings] Signed-off-by: Li Zefan Acked-by: Serge Hallyn Cc: Serge Hallyn Cc: Paul Menage Cc: Pavel Emelyanov Signed-off-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4efd1a1b2f09a4b746dd9dc057986c6dadcb1317 Author: Pavel Emelyanov Date: Fri Jul 25 01:47:07 2008 -0700 devcgroup: relax white-list protection down to RCU Currently this list is protected with a simple spinlock, even for reading from one. This is OK, but can be better. Actually I want it to be better very much, since after replacing the OpenVZ device permissions engine with the cgroup-based one I noticed, that we set 12 default device permissions for each newly created container (for /dev/null, full, terminals, ect devices), and people sometimes have up to 20 perms more, so traversing the ~30-40 elements list under a spinlock doesn't seem very good. Here's the RCU protection for white-list - dev_whitelist_item-s are added and removed under the devcg->lock, but are looked up in permissions checking under the rcu_read_lock. Signed-off-by: Pavel Emelyanov Acked-by: Serge Hallyn Cc: Balbir Singh Cc: Paul Menage Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e885dcde75685e09f23cffae1f6d5169c105b8a0 Author: Serge E. Hallyn Date: Fri Jul 25 01:47:06 2008 -0700 cgroup_clone: use pid of newly created task for new cgroup cgroup_clone creates a new cgroup with the pid of the task. This works correctly for unshare, but for clone cgroup_clone is called from copy_namespaces inside copy_process, which happens before the new pid is created. As a result, the new cgroup was created with current's pid. This patch: 1. Moves the call inside copy_process to after the new pid is created 2. Passes the struct pid into ns_cgroup_clone (as it is not yet attached to the task) 3. Passes a name from ns_cgroup_clone() into cgroup_clone() so as to keep cgroup_clone() itself simpler 4. Uses pid_vnr() to get the process id value, so that the pid used to name the new cgroup is always the pid as it would be known to the task which did the cloning or unsharing. I think that is the most intuitive thing to do. This way, task t1 does clone(CLONE_NEWPID) to get t2, which does clone(CLONE_NEWPID) to get t3, then the cgroup for t3 will be named for the pid by which t2 knows t3. (Thanks to Dan Smith for finding the main bug) Changelog: June 11: Incorporate Paul Menage's feedback: don't pass NULL to ns_cgroup_clone from unshare, and reduce patch size by using 'nodename' in cgroup_clone. June 10: Original version [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Serge Hallyn Acked-by: Paul Menage Tested-by: Dan Smith Cc: Balbir Singh Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 856c13aa1ff6136c1968414fdea5938ea9d5ebf2 Author: Paul Menage Date: Fri Jul 25 01:47:04 2008 -0700 cgroup files: convert res_counter_write() to be a cgroups write_string() handler Currently res_counter_write() is a raw file handler even though it's ultimately taking a number, since in some cases it wants to pre-process the string when converting it to a number. This patch converts res_counter_write() from a raw file handler to a write_string() handler; this allows some of the boilerplate copying/locking/checking to be removed, and simplies the cleanup path, since these functions are now performed by the cgroups framework. [lizf@cn.fujitsu.com: build fix] Signed-off-by: Paul Menage Cc: Paul Jackson Cc: Pavel Emelyanov Cc: Balbir Singh Cc: Serge Hallyn Cc: KAMEZAWA Hiroyuki Signed-off-by: Li Zefan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f92523e3a7861f5dbd76021e0719a35fe8771f2d Author: Paul Menage Date: Fri Jul 25 01:47:03 2008 -0700 cgroup files: convert devcgroup_access_write() into a cgroup write_string() handler This patch converts devcgroup_access_write() from a raw file handler into a handler for the cgroup write_string() method. This allows some boilerplate copying/locking/checking to be removed and simplifies the cleanup path, since these functions are performed by the cgroups framework before calling the handler. Signed-off-by: Paul Menage Cc: Paul Jackson Cc: Pavel Emelyanov Cc: Balbir Singh Acked-by: Serge Hallyn Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e37123953292146445c8629b3950d0513fd10ae2 Author: Paul Menage Date: Fri Jul 25 01:47:02 2008 -0700 cgroup files: remove cpuset_common_file_write() This patch tweaks the signatures of the update_cpumask() and update_nodemask() functions so that they can be called directly as handlers for the new cgroups write_string() method. This allows cpuset_common_file_write() to be removed. Signed-off-by: Paul Menage Cc: Paul Jackson Cc: Pavel Emelyanov Cc: Balbir Singh Cc: Serge Hallyn Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af351026aafc8da16518a02b41c66d3e0c1cdef4 Author: Paul Menage Date: Fri Jul 25 01:47:01 2008 -0700 cgroup files: turn attach_task_by_pid directly into a cgroup write handler This patch changes attach_task_by_pid() to take a u64 rather than a string; as a result it can be called directly as a control groups write_u64 handler, and cgroup_common_file_write() can be removed. Signed-off-by: Paul Menage Cc: Paul Jackson Cc: Pavel Emelyanov Cc: Balbir Singh Cc: Serge Hallyn Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6379c106152388f7ea45d6dda63edda0e9181fc8 Author: Paul Menage Date: Fri Jul 25 01:47:01 2008 -0700 cgroup files: move notify_on_release file to separate write handler This patch moves the write handler for the cgroups notify_on_release file into a separate handler. This handler requires no cgroups locking since it relies on atomic bitops for synchronization. Signed-off-by: Paul Menage Cc: Paul Jackson Cc: Pavel Emelyanov Cc: Balbir Singh Cc: Serge Hallyn Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84eea842886ac35020be6043e04748ed22014359 Author: Paul Menage Date: Fri Jul 25 01:47:00 2008 -0700 cgroups: misc cleanups to write_string patchset This patch contains cleanups suggested by reviewers for the recent write_string() patchset: - pair cgroup_lock_live_group() with cgroup_unlock() in cgroup.c for clarity, rather than directly unlocking cgroup_mutex. - make the return type of cgroup_lock_live_group() a bool - use a #define'd constant for the local buffer size in read/write functions Signed-off-by: Paul Menage Cc: Paul Jackson Cc: Pavel Emelyanov Cc: Balbir Singh Acked-by: Serge Hallyn Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e788e066c651b1bbf4a927dc95395c1aa13be436 Author: Paul Menage Date: Fri Jul 25 01:46:59 2008 -0700 cgroup files: move the release_agent file to use typed handlers Adds cgroup_release_agent_write() and cgroup_release_agent_show() methods to handle writing/reading the path to a cgroup hierarchy's release agent. As a result, cgroup_common_file_read() is now unnecessary. As part of the change, a previously-tolerated race in cgroup_release_agent() is avoided by copying the current release_agent_path prior to calling call_usermode_helper(). Signed-off-by: Paul Menage Cc: Paul Jackson Cc: Pavel Emelyanov Cc: Balbir Singh Acked-by: Serge Hallyn Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db3b14978abc02041046ed8353f0899cb58ffffc Author: Paul Menage Date: Fri Jul 25 01:46:58 2008 -0700 cgroup files: add write_string cgroup control file method This patch adds a write_string() method for cgroups control files. The semantics are that a buffer is copied from userspace to kernelspace and the handler function invoked on that buffer. The buffer is guaranteed to be nul-terminated, and no longer than max_write_len (defaulting to 64 bytes if unspecified). Later patches will convert existing raw file write handlers in control group subsystems to use this method. Signed-off-by: Paul Menage Cc: Paul Jackson Cc: Pavel Emelyanov Acked-by: Balbir Singh Acked-by: Serge Hallyn Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce16b49d37e748574f7fabc2726268d542d0aa1a Author: Paul Menage Date: Fri Jul 25 01:46:57 2008 -0700 cgroup files: clean up whitespace in struct cftype This patch removes some extraneous spaces from method declarations in struct cftype, to fit in with conventional kernel style. Signed-off-by: Paul Menage Cc: Paul Jackson Cc: Pavel Emelyanov Cc: Balbir Singh Cc: Serge Hallyn Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8947f9d5b361ce927be6d5c11fed57905b7a4100 Author: Li Zefan Date: Fri Jul 25 01:46:56 2008 -0700 cgroups: annotate two variables with __read_mostly - need_forkexit_callback will be read only after system boot. - use_task_css_set_links will be read only after it's set. And these 2 variables are checked when a new process is forked. Signed-off-by: Li Zefan Acked-by: Paul Menage Acked-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 71cbb949d17d4d776abd547135feb7f3282405c8 Author: KOSAKI Motohiro Date: Fri Jul 25 01:46:55 2008 -0700 cgroup: list_for_each cleanup -------------------------- while() { list_entry(); ... } -------------------------- is equivalent to following code. -------------------------- list_for_each_entry(){ ... } -------------------------- later can review easily more. this patch is just clean up. it doesn't have any behavor change. Signed-off-by: KOSAKI Motohiro Cc: Paul Menage Cc: Li Zefan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2992db2a4f7ae10f61d5bc68c7c1528cec639e2 Author: Pavel Emelyanov Date: Fri Jul 25 01:46:55 2008 -0700 Mark res_counter_charge(_locked) with __must_check Ignoring their return values may result in counter underflow in the future - when the value charged will be uncharged (or in "leaks" - when the value is not uncharged). This also prevents from using charging routines to decrement the counter value (i.e. uncharge it) ;) (Current code works OK with res_counter, however :) ) Signed-off-by: Pavel Emelyanov Cc: Balbir Singh Cc: Paul Menage Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e9abd89cbdf9b73d327d8173343abce9022609b Author: Li Zefan Date: Fri Jul 25 01:46:54 2008 -0700 cgroup: use read lock to guard find_existing_css_set() The function does not modify anything (except the temporary css template), so it's sufficient to hold read lock. Signed-off-by: Li Zefan Acked-by: Paul Menage Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d96d82da437ed5f2053821779ed5d7797ed1f81 Author: Mike Frysinger Date: Fri Jul 25 01:46:53 2008 -0700 procfs-guide: drop pointless   entities Having trailing   entities in a revision numer seems pretty pointless to me. More so, it's causing me pains, so just drop them since no other guide is doing this. Signed-off-by: Mike Frysinger Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 657d3bfa98e542271b449f8cd84c7501ae2b2255 Author: Jan Kara Date: Fri Jul 25 01:46:52 2008 -0700 quota: implement sending information via netlink about user below quota Sometimes it may be useful for userspace to know (e.g. for some hosting guys) that some user stopped exceeding his hardlimit or softlimit in quotas. Implement sending of such events to userspace via quota netlink protocol so that they don't have to poll for such events. Based on idea and initial implementation by Vladislav Bogdanov. Cc: Vladislav Bogdanov Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 03b063436ca1076301de58d9d628f610ab5404ad Author: Jan Kara Date: Fri Jul 25 01:46:52 2008 -0700 quota: convert macros to inline functions Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74abb9890dafb12a50dc140de215ed477beb1b88 Author: Jan Kara Date: Fri Jul 25 01:46:51 2008 -0700 quota: move function-macros from quota.h to quotaops.h Move declarations of some macros, which should be in fact functions to quotaops.h. This way they can be later converted to inline functions because we can now use declarations from quota.h. Also add necessary includes of quotaops.h to a few files. [akpm@linux-foundation.org: fix JFS build] [akpm@linux-foundation.org: fix UFS build] [vegard.nossum@gmail.com: fix QUOTA=n build] Signed-off-by: Jan Kara Cc: Vegard Nossum Cc: Arjen Pool Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 02a55ca87185e114e5d298a8d00608501dbabf67 Author: Jan Kara Date: Fri Jul 25 01:46:50 2008 -0700 quota: cleanup loop in sync_dquots() Make loop in sync_dquots() checking whether there's something to write more readable, remove useless variable and macro info_any_dirty() which is used only in this place. Signed-off-by: Jan Kara Cc: "Vegard Nossum" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b85f4b87a511bea86dac68c4f0fabaee2cac6c4c Author: Jan Kara Date: Fri Jul 25 01:46:50 2008 -0700 quota: rename quota functions from upper case, make bigger ones non-inline Cleanup quotaops.h: Rename functions from uppercase to lowercase (and define backward compatibility macros), move larger functions to dquot.c and make them non-inline. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b48d380541f634663b71766005838edbb7261685 Author: Jan Kara Date: Fri Jul 25 01:46:49 2008 -0700 quota: fix possible infinite loop in quota code When quota structure is going to be dropped and it is dirty, quota code tries to write it. If the write fails for some reason (e. g. transaction cannot be started because the journal is aborted), we try writing again and again and again... Fix the problem by clearing the dirty bit even if the write failed. (akpm: for 2.6.27, 2.6.26.x and 2.6.25.x) Signed-off-by: Jan Kara Reviewed-by: dingdinghua Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 41003cde95e7e976d3876dbdcdc83dd0a9059279 Author: Joe Peterson Date: Fri Jul 25 01:46:48 2008 -0700 UTC timestamp option for FAT filesystems fix Signed-off-by: Joe Peterson Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b271e067c896ad4082b15e96077675d08db40625 Author: Joe Peterson Date: Fri Jul 25 01:46:47 2008 -0700 fatfs: add UTC timestamp option Provide a new mount option ("tz=UTC") for DOS (vfat/msdos) filesystems, allowing timestamps to be in coordinated universal time (UTC) rather than local time in applications where doing this is advantageous. In particular, portable devices that use fat/vfat (such as digital cameras) can benefit from using UTC in their internal clocks, thus avoiding daylight saving time errors and general time ambiguity issues. The user of the device does not have to worry about changing the time when moving from place or when daylight saving changes. The new mount option, when set, disables the counter-adjustment that Linux currently makes to FAT timestamp info in anticipation of the normal userspace time zone correction. When used in this new mode, all daylight saving time and time zone handling is done in userspace as is normal for many other filesystems (like ext3). The default mode, which remains unchanged, is still appropriate when mounting volumes written in Windows (because of its use of local time). I originally based this patch on one submitted last year by Paul Collins, but I updated it to work with current source and changed variable/option naming. Ogawa Hirofumi (who maintains these filesystems) and I discussed this patch at length on lkml, and he suggested using the option name in the attached version of the patch. Barry Bouwsma pointed out a good addition to the patch as well. Signed-off-by: Joe Peterson Signed-off-by: Paul Collins Acked-by: OGAWA Hirofumi Cc: Barry Bouwsma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8938a62a85d1f487e02c3b01955b47c9598f6d2 Author: Adrian Bunk Date: Fri Jul 25 01:46:46 2008 -0700 remove unused #include 's Remove some unused #include 's. Signed-off-by: Adrian Bunk Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cf6ae8b50e0ee3f764392dadd1970e3f03c40773 Author: Adrian Bunk Date: Fri Jul 25 01:46:46 2008 -0700 remove the in-kernel struct dirent{,64} The kernel struct dirent{,64} were different from the ones in userspace. Even worse, we exported the kernel ones to userspace. But after the fat usages are fixed we can remove the conflicting kernel versions. Reviewed-by: H. Peter Anvin Signed-off-by: Adrian Bunk Cc: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7557bc66be629d19a402e752673708bfbb8b5e86 Author: Rene Scharfe Date: Fri Jul 25 01:46:45 2008 -0700 msdos fs: remove unsettable atari option It has been impossible to set the option 'atari' of the MSDOS filesystem for several years. Since nobody seems to have missed it, let's remove its remains. Signed-off-by: Rene Scharfe Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dcd8c53f13f068ee039589d84fbd0baf686abc41 Author: OGAWA Hirofumi Date: Fri Jul 25 01:46:44 2008 -0700 fat: small optimization to __fat_readdir() This removes unnecessary parsing for directory entries. If short_only, we don't need to parse longname. And if !both and it found the longname, we don't need shortname. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 98a15160049fc1a0f822047f33ff513906a35567 Author: OGAWA Hirofumi Date: Fri Jul 25 01:46:44 2008 -0700 fat: use same logic in fat_search_long() and __fat_readdir() This uses uses stack for shortname, and uses __getname() for longname in fat_search_long() and __fat_readdir(). By this, it removes unneeded __getname() for shortname. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d688611674cc9c265ee67e89d2ea8bf060c17e8d Author: OGAWA Hirofumi Date: Fri Jul 25 01:46:43 2008 -0700 fat: cleanup fs/fat/dir.c This is no logic changes, just cleans fs/fat/dir.c up. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 531f710f8e68fd2bad7516a090bff372f5f9cf6d Author: Adrian Bunk Date: Fri Jul 25 01:46:43 2008 -0700 fat/dir.c: switch to struct __fat_dirent struct __fat_dirent is what was formerly the kernel struct dirent (that was different from the userspace struct dirent). Converting all fat users to struct __fat_dirent will allow us to get rid of the conflicting struct dirent definition. Signed-off-by: Adrian Bunk Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4596c8aaf96e8634ca755c9f34b91420a39bebd4 Author: OGAWA Hirofumi Date: Fri Jul 25 01:46:42 2008 -0700 fat: fix VFAT_IOCTL_READDIR_xxx and cleanup for userland "struct dirent" is a kernel type here, but is a **different type** in userspace! This means both the structure and the IOCTL number is wrong! So, this adds new "struct __fat_dirent" to generate correct IOCTL number. And kernel stuff moves to under __KERNEL__. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d44d9741f6808c107a144f469fb89e6fe7c55e3 Author: OGAWA Hirofumi Date: Fri Jul 25 01:46:41 2008 -0700 fat: fix parse_options() Current parse_options() exits too early. We need to run the code of bottom in this function even if users doesn't specify options. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3264d4ded4d916d294d776b77b72d477c63ac3be Author: Shen Feng Date: Fri Jul 25 01:46:41 2008 -0700 reiserfs: remove double definitions of xattr macros remove the definitions of macros: XATTR_SECURITY_PREFIX XATTR_TRUSTED_PREFIX XATTR_USER_PREFIX since they are defined in linux/xattr.h Signed-off-by: Shen Feng Signed-off-by: Mingming Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 90415deac75a761a25239af6f56381546f8d2201 Author: Jeff Mahoney Date: Fri Jul 25 01:46:40 2008 -0700 reiserfs: convert j_commit_lock to mutex j_commit_lock is a semaphore but uses it as if it were a mutex. This patch converts it to a mutex. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jeff Mahoney Cc: Matthew Wilcox Cc: Chris Mason Cc: Edward Shishkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit afe70259076fff0446001eaa1a287f615241a357 Author: Jeff Mahoney Date: Fri Jul 25 01:46:39 2008 -0700 reiserfs: convert j_flush_sem to mutex j_flush_sem is a semaphore but uses it as if it were a mutex. This patch converts it to a mutex. [akpm@linux-foundation.org: fix mutex_trylock retval treatment] Signed-off-by: Jeff Mahoney Cc: Matthew Wilcox Cc: Chris Mason Cc: Edward Shishkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f68215c4640a38d66429014e524a627bf572d26a Author: Jeff Mahoney Date: Fri Jul 25 01:46:38 2008 -0700 reiserfs: convert j_lock to mutex j_lock is a semaphore but uses it as if it were a mutex. This patch converts it to a mutex. Signed-off-by: Jeff Mahoney Cc: Matthew Wilcox Cc: Chris Mason Cc: Edward Shishkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 00b441970a0ab48185244300ac7d4e4eb76df692 Author: Jan Kara Date: Fri Jul 25 01:46:38 2008 -0700 reiserfs: correct mount option parsing to detect when quota options can be changed We should not allow user to change quota mount options when quota is just suspended. It would make mount options and internal quota state inconsistent. Also we should not allow user to change quota format when quota is turned on. On the other hand we can just silently ignore when some option is set to the value it already has (some mount versions do this on remount). Finally, we should not discard current quota options if parsing of mount options fails. Cc: Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4506567b24d3ea707e46e8aad64caef539382f4b Author: Jan Kara Date: Fri Jul 25 01:46:37 2008 -0700 reiserfs: fix typos in messages and comments (journalled -> journaled) Cc: Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d4f7fddf8882b214e4aabb3bdb37f90a72b2537 Author: Jan Kara Date: Fri Jul 25 01:46:36 2008 -0700 reiserfs: fix synchronization of quota files in journal=data mode In journal=data mode, it is not enough to do write_inode_now() as done in vfs_quota_on() to write all data to their final location (which is needed for quota_read to work correctly). Calling journal_end_sync() before calling vfs_quota_on() does it's job because transactions are committed to the journal and data marked as dirty in memory so write_inode_now() writes them to their final locations. Cc: Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 895c23f8c39c0c8d7b536bb2566d4aa968d78be2 Author: Matthias Kaehlcke Date: Fri Jul 25 01:46:36 2008 -0700 hfsplus: convert the extents_lock in a mutex Apple Extended HFS file system: The semaphore extents lock is used as a mutex. Convert it to the mutex API. Signed-off-by: Matthias Kaehlcke Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 39f8d472f280dee6503a364d1d911b9e20ce3ec9 Author: Matthias Kaehlcke Date: Fri Jul 25 01:46:35 2008 -0700 hfs: convert extents_lock in a mutex Apple Macintosh file system: The semaphore extens_lock is used as a mutex. Convert it to the mutex API Signed-off-by: Matthias Kaehlcke Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3084b72de73a6f8af0f16989ffb348068bd066d4 Author: Matthias Kaehlcke Date: Fri Jul 25 01:46:34 2008 -0700 hfs: convert bitmap_lock in a mutex Apple Macintosh file system: The semaphore bitmap_lock is used as a mutex. Convert it to the mutex API Signed-off-by: Matthias Kaehlcke Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit de0ca06a99c33df8333955642843331ab6b6e7ff Author: Adrian Bunk Date: Fri Jul 25 01:46:34 2008 -0700 coda: remove CODA_FS_OLD_API While fixing CONFIG_ leakages to the userspace kernel headers I ran into CODA_FS_OLD_API. After five years, are there still people using the old API left? Especially considering that you have to choose at compile time which API to support in the kernel (and distributions tend to offer the new API for some time). Jan: "The old API can definitely go. Around the time the new interface went in there were some non-Coda userspace file system implementations that took a while longer to convert to the new API, but by now they all switched to the new interface or in some cases to a FUSE-based solution." Signed-off-by: Adrian Bunk Acked-by: Jan Harkes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c0a1633b6201ef79e31b7da464d44fdf5953054d Author: Adam Greenblatt Date: Fri Jul 25 01:46:32 2008 -0700 isofs: fix minor filesystem corruption Some iso9660 images contain files with rockridge data that is either incorrect or incompletely parsed. Prior to commit f2966632a134e865db3c819346a1dc7d96e05309 ("[PATCH] rock: handle directory overflows") (included with kernel 2.6.13) the kernel ignored the rockridge data for these files, while still allowing the files to be accessed under their non-rockridge names. That commit inadvertently changed things so that files with invalid rockridge data could not be accessed at all. (I ran across the problem when comparing some old CDs with hard disk copies I had made long ago under kernel 2.4: a few of the files on the hard disk copies were no longer visible on the CDs.) This change reverts to the pre-2.6.13 behavior. Signed-off-by: Adam Greenblatt Reviewed-by: Pekka Enberg Cc: [2.6.25.x, 2.6.26.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 275c0a8f1253a7542ad9726956c918d8a1f694c4 Author: Duane Griffin Date: Fri Jul 25 01:46:31 2008 -0700 ext3: validate directory entry data before use ext3_dx_find_entry uses ext3_next_entry without verifying that the entry is valid. If its rec_len == 0 this causes an infinite loop. Refactor the loop to check the validity of entries before checking whether they match and moving onto the next one. There are other uses of ext3_next_entry in this file which also look problematic. They should be reviewed and fixed if/when we have a test-case that triggers them. This patch fixes the first case (image hdb.25.softlockup.gz) reported in http://bugzilla.kernel.org/show_bug.cgi?id=10882. Signed-off-by: Duane Griffin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cbe5f466f6995e10a10c7ae66d6dc8608f08a6b8 Author: Hidehiro Kawai Date: Fri Jul 25 01:46:30 2008 -0700 jbd: don't abort if flushing file data failed In ordered mode, the current jbd aborts the journal if a file data buffer has an error. But this behavior is unintended, and we found that it has been adopted accidentally. This patch undoes it and just calls printk() instead of aborting the journal. Additionally, set AS_EIO into the address_space object of the failed buffer which is submitted by journal_do_submit_data() so that fsync() can get -EIO. Missing error checkings are also added to inform errors on file data buffers to the user. The following buffers are targeted. (a) the buffer which has already been written out by pdflush (b) the buffer which has been unlocked before scanned in the t_locked_list loop [akpm@linux-foundation.org: improve grammar in a printk] Signed-off-by: Hidehiro Kawai Acked-by: Jan Kara Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ef2720397bb813d4985405a5ae7b8ad6474188b Author: Li Zefan Date: Fri Jul 25 01:46:29 2008 -0700 ext3: kill 2 useless magic numbers dx_root_limit() will never return 20, and I can't figure out what 20 stands for. This function has never changed since htree directory indexing was merged. Similar for dx_node_limit() and the magic 22. Signed-off-by: Li Zefan Acked-by: Andreas Dilger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc80c44277b3c92d808b73e9d40e120229aa4b6a Author: Toshiyuki Okajima Date: Fri Jul 25 01:46:29 2008 -0700 jbd: positively dispose the unmapped data buffers in journal_commit_transaction() After ext3-ordered files are truncated, there is a possibility that the pages which cannot be estimated still remain. Remaining pages can be released when the system has really few memory. So, it is not memory leakage. But the resource management software etc. may not work correctly. It is possible that journal_unmap_buffer() cannot release the buffers, and the pages to which they belong because they are attached to a commiting transaction and journal_unmap_buffer() cannot release them. To release such the buffers and the pages later, journal_unmap_buffer() leaves it to journal_commit_transaction(). (journal_unmap_buffer() puts the mark 'BH_Freed' to the buffers so that journal_commit_transaction() can identify whether they can be released or not.) In the journalled mode and the writeback mode, jbd does with only metadata buffers. But in the ordered mode, jbd does with metadata buffers and also data buffers. Actually, journal_commit_transaction() releases only the metadata buffers of which release is demanded by journal_unmap_buffer(), and also releases the pages to which they belong if possible. As a result, the data buffers of which release is demanded by journal_unmap_buffer() remain after a transaction commits. And also the pages to which they belong remain. Such the remained pages don't have mapping any longer. Due to this fact, there is a possibility that the pages which cannot be estimated remain. The metadata buffers marked 'BH_Freed' and the pages to which they belong can be released at 'JBD: commit phase 7'. Therefore, by applying the same code into 'JBD: commit phase 2' (where the data buffers are done with), journal_commit_transaction() can also release the data buffers marked 'BH_Freed' and the pages to which they belong. As a result, all the buffers marked 'BH_Freed' can be released, and also all the pages to which these buffers belong can be released at journal_commit_transaction(). So, the page which cannot be estimated is lost. <> > spin_lock(&journal->j_list_lock); > while (commit_transaction->t_forget) { > transaction_t *cp_transaction; > struct buffer_head *bh; > > jh = commit_transaction->t_forget; >... > if (buffer_freed(bh)) { > ^^^^^^^^^^^^^^^^^^^^^^^^ > clear_buffer_freed(bh); > ^^^^^^^^^^^^^^^^^^^^^^^^ > clear_buffer_jbddirty(bh); > } > > if (buffer_jbddirty(bh)) { > JBUFFER_TRACE(jh, "add to new checkpointing trans"); > __journal_insert_checkpoint(jh, commit_transaction); > JBUFFER_TRACE(jh, "refile for checkpoint writeback"); > __journal_refile_buffer(jh); > jbd_unlock_bh_state(bh); > } else { > J_ASSERT_BH(bh, !buffer_dirty(bh)); > ... > JBUFFER_TRACE(jh, "refile or unfile freed buffer"); > __journal_refile_buffer(jh); > if (!jh->b_transaction) { > jbd_unlock_bh_state(bh); > /* needs a brelse */ > journal_remove_journal_head(bh); > release_buffer_page(bh); > ^^^^^^^^^^^^^^^^^^^^^^^^ > } else > } **************************************************************** * Apply the code of "^^^^^^" lines into 'JBD: commit phase 2' * **************************************************************** At journal_commit_transaction() code, there is one extra message in the series of jbd debug messages. ("JBD: commit phase 2") This patch fixes it, too. Signed-off-by: Toshiyuki Okajima Acked-by: Jan Kara Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a10320e8f7c4dcfa050aac566092f29b40458d5a Author: Adrian Bunk Date: Fri Jul 25 01:46:26 2008 -0700 jbd: unexport journal_update_superblock Remove the unused EXPORT_SYMBOL(journal_update_superblock). Signed-off-by: Adrian Bunk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3ccc3167b0e5d46ab3bf03e22fbdb7616ce038cd Author: Duane Griffin Date: Fri Jul 25 01:46:26 2008 -0700 ext3: handle deleting corrupted indirect blocks While freeing indirect blocks we attach a journal head to the parent buffer head, free the blocks, then journal the parent. If the indirect block list is corrupted and points to the parent the journal head will be detached when the block is cleared, causing an OOPS. Check for that explicitly and handle it gracefully. This patch fixes the third case (image hdb.20000057.nullderef.gz) reported in http://bugzilla.kernel.org/show_bug.cgi?id=10882. Immediately above the change, in the ext3_free_data function, we call ext3_clear_blocks to clear the indirect blocks in this parent block. If one of those blocks happens to actually be the parent block it will clear b_private / BH_JBD. I did the check at the end rather than earlier as it seemed more elegant. I don't think there should be much practical difference, although it is possible the FS may not be quite so badly corrupted if we did it the other way (and didn't clear the block at all). To be honest, I'm not convinced there aren't other similar failure modes lurking in this code, although I couldn't find any with a quick review. [akpm@linux-foundation.org: fix printk warning] Signed-off-by: Duane Griffin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95450f5a7e53d5752ce1a0d0b8282e10fe745ae0 Author: Hidehiro Kawai Date: Fri Jul 25 01:46:24 2008 -0700 ext3: don't read inode block if the buffer has a write error A transient I/O error can corrupt inode data. Here is the scenario: (1) update inode_A at the block_B (2) pdflush writes out new inode_A to the filesystem, but it results in write I/O error, at this point, BH_Uptodate flag of the buffer for block_B is cleared and BH_Write_EIO is set (3) create new inode_C which located at block_B, and __ext3_get_inode_loc() tries to read on-disk block_B because the buffer is not uptodate (4) if it can read on-disk block_B successfully, inode_A is overwritten by old data This patch makes __ext3_get_inode_loc() not read the inode block if the buffer has BH_Write_EIO flag. In this case, the buffer should have the latest information, so setting the uptodate flag to the buffer (this avoids WARN_ON_ONCE() in mark_buffer_dirty().) According to this change, we would need to test BH_Write_EIO flag for the error checking. Currently nobody checks write I/O errors on metadata buffers, but it will be done in other patches I'm working on. Signed-off-by: Hidehiro Kawai Cc: sugita Cc: Satoshi OSHIMA Cc: Nick Piggin Cc: Jan Kara Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae76dd9a6b5bbe5315fb7028e03f68f75b8538f3 Author: Duane Griffin Date: Fri Jul 25 01:46:23 2008 -0700 ext3: handle corrupted orphan list at mount If the orphan node list includes valid, untruncatable nodes with nlink > 0 the ext3_orphan_cleanup loop which attempts to delete them will not do so, causing it to loop forever. Fix by checking for such nodes in the ext3_orphan_get function. This patch fixes the second case (image hdb.20000009.softlockup.gz) reported in http://bugzilla.kernel.org/show_bug.cgi?id=10882. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: printk warning fix] Signed-off-by: Duane Griffin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef1afd39519b74fbe1f63c9ab5a14490effec0e3 Author: Shen Feng Date: Fri Jul 25 01:46:23 2008 -0700 ext3: remove double definitions of xattr macros remove the definitions of macros: XATTR_TRUSTED_PREFIX XATTR_USER_PREFIX since they are defined in linux/xattr.h Signed-off-by: Shen Feng Signed-off-by: Mingming Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f31fddfa26b7594b44ff2b34f9a04ba409e0f91 Author: Mingming Cao Date: Fri Jul 25 01:46:22 2008 -0700 jbd: fix race between free buffer and commit transaction journal_try_to_free_buffers() could race with jbd commit transaction when the later is holding the buffer reference while waiting for the data buffer to flush to disk. If the caller of journal_try_to_free_buffers() request tries hard to release the buffers, it will treat the failure as error and return back to the caller. We have seen the directo IO failed due to this race. Some of the caller of releasepage() also expecting the buffer to be dropped when passed with GFP_KERNEL mask to the releasepage()->journal_try_to_free_buffers(). With this patch, if the caller is passing the __GFP_WAIT and __GFP_FS to indicating this call could wait, in case of try_to_free_buffers() failed, let's waiting for journal_commit_transaction() to finish commit the current committing transaction, then try to free those buffers again. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Mingming Cao Reviewed-by: Badari Pulavarty Acked-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ebfbe9f926553eabc21b4400918d1216b27ed0c Author: Shen Feng Date: Fri Jul 25 01:46:21 2008 -0700 ext3: improve some code in rb tree part of dir.c - remove unnecessary code in free_rb_tree_fname - rename free_rb_tree_fname to ext3_htree_create_dir_info since it and ext3_htree_free_dir_info are a pair - replace kmalloc with kzalloc in ext3_htree_free_dir_info Signed-off-by: Shen Feng Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1984bb763c2e50d0ebfb0cf56d1b319bd7afe63a Author: Duane Griffin Date: Fri Jul 25 01:46:21 2008 -0700 jbd: tidy up revoke cache initialisation and destruction Make revocation cache destruction safe to call if initialisation fails partially or entirely. This allows it to be used to cleanup in the case of initialisation failure, simplifying that code slightly. Signed-off-by: Duane Griffin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4d79ca2fa211cffc07306eeed7013448e77d7ec Author: Duane Griffin Date: Fri Jul 25 01:46:20 2008 -0700 jbd: eliminate duplicated code in revocation table init/destroy functions The revocation table initialisation/destruction code is repeated for each of the two revocation tables stored in the journal. Refactoring the duplicated code into functions is tidier, simplifies the logic in initialisation in particular, and slightly reduces the code size. There should not be any functional change. Signed-off-by: Duane Griffin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3850f7a521dc17659ef6758a219f083418788490 Author: Duane Griffin Date: Fri Jul 25 01:46:19 2008 -0700 jbd: replace potentially false assertion with if block If an error occurs during jbd cache initialisation it is possible for the journal_head_cache to be NULL when journal_destroy_journal_head_cache is called. Replace the J_ASSERT with an if block to handle the situation correctly. Note that even with this fix things will break badly if jbd is statically compiled in and cache initialisation fails. Signed-off-by: Duane Griffin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d06bf1d252fe16f5f0d13e04da7a9913420aa1cf Author: Jan Kara Date: Fri Jul 25 01:46:18 2008 -0700 ext3: correct mount option parsing to detect when quota options can be changed We should not allow user to change quota mount options when quota is just suspended. I would make mount options and internal quota state inconsistent. Also we should not allow user to change quota format when quota is turned on. On the other hand we can just silently ignore when some option is set to the value it already has (mount does this on remount). Cc: Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99aeaf639f61ab6be1967e5f92e2e28dafad8383 Author: Jan Kara Date: Fri Jul 25 01:46:17 2008 -0700 ext3: fix typos in messages and comments (journalled -> journaled) Cc: Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9cfe7b9010aa66da5f3b2bc33d9e30a4d53bd274 Author: Jan Kara Date: Fri Jul 25 01:46:16 2008 -0700 ext3: fix synchronization of quota files in journal=data mode In journal=data mode, it is not enough to do write_inode_now as done in vfs_quota_on() to write all data to their final location (which is needed for quota_read to work correctly). Calling journal_flush() does its job. Reported-by: Nick Cc: Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 50c33a84db4aa5082e3af8d873b22344ae2ebea8 Author: Samuel Thibault Date: Fri Jul 25 01:46:16 2008 -0700 ext2: fix typo in Hurd part of include/linux/ext2_fs.h Fix typo in Hurd part of include/linux/ext2_fs.h The ';' here is redundant or can even pose problem. This is actually not used by the Linux kernel, but it is exposed in GNU/Hurd. Signed-off-by: Samuel Thibault Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f905f06fca5d3949eca12f5a43e251a404b3470a Author: Shen Feng Date: Fri Jul 25 01:46:15 2008 -0700 ext2: remove double definitions of xattr macros remove the definitions of macros: XATTR_TRUSTED_PREFIX XATTR_USER_PREFIX since they are defined in linux/xattr.h Signed-off-by: Shen Feng Signed-off-by: Mingming Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb523f32275344282f20ef3352cbf03e599241e6 Author: Adrian Bunk Date: Fri Jul 25 01:46:14 2008 -0700 minix: remove !NO_TRUNCATE code This patch removes the !NO_TRUNCATE code that anyway required a manual editing of the code for being used. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbcd6d543de335bf81e96477f46a60a8bf51039c Author: Eric Miao Date: Fri Jul 25 01:46:14 2008 -0700 gpio: max732x driver This adds a driver supporting a family of I2C port expanders from Maxim, which includes the MAX7319 and MAX7320-7327 chips. [dbrownell@users.sourceforge.net: minor fixes] Signed-off-by: Jack Ren Signed-off-by: Eric Miao Acked-by: Jean Delvare Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7444a72effa632fcd8edc566f880d96fe213c73b Author: Michael Buesch Date: Fri Jul 25 01:46:11 2008 -0700 gpiolib: allow user-selection This patch adds functionality to the gpio-lib subsystem to make it possible to enable the gpio-lib code even if the architecture code didn't request to get it built in. The archtitecture code does still need to implement the gpiolib accessor functions in its asm/gpio.h file. This patch adds the implementations for x86 and PPC. With these changes it is possible to run generic GPIO expansion cards on every architecture that implements the trivial wrapper functions. Support for more architectures can easily be added. Signed-off-by: Michael Buesch Cc: Benjamin Herrenschmidt Cc: Stephen Rothwell Cc: David Brownell Cc: Russell King Cc: Haavard Skinnemoen Cc: Jesper Nilsson Cc: Ralf Baechle Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Jean Delvare Cc: Samuel Ortiz Cc: Kumar Gala Cc: Sam Ravnborg Cc: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff1d5c2f0268f4e32103536e2e65480b5b7b6530 Author: Michael Buesch Date: Fri Jul 25 01:46:10 2008 -0700 gpio: add bt8xxgpio driver This adds the bt8xxgpio driver. The purpose of the bt8xxgpio driver is to export all of the 24 GPIO pins available on Brooktree 8xx chips to the kernel GPIO infrastructure. This makes it possible to use a physically modified BT8xx card as cheap digital GPIO card. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Michael Buesch Cc: David Brownell Cc: Stephen Rothwell Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f1cc3b10e6ee0c5c7c8ed27f8771c4f252b4862 Author: David Brownell Date: Fri Jul 25 01:46:09 2008 -0700 gpio: mcp23s08 handles multiple chips per chipselect Teach the mcp23s08 driver about a curious feature of these chips: up to four of them can share the same chipselect, with the SPI signals wired in parallel, by matching two bits in the first protocol byte against two address lines on the chip. This is handled by three software changes: * Platform data now holds an array of per-chip structs, not just one chip's address and pullup configuration. * Probe() and remove() now use another level of structure, wrapping an instance of the original structure for each mcp23s08 chip sharing that chipselect. * The HAEN bit is set, so that the hardware address bits can no longer be ignored (boot firmware may not have enabled them). The "one struct per chip" preserves the guts of the current code, but platform_data will need minor changes. OLD: /* incorrect "slave" ID may not have mattered */ .slave = 3, .pullups = BIT(3) | BIT(1) | BIT(0), NEW: /* slave address _must_ match chip's wiring */ .chip[3] = { .is_present = true, .pullups = BIT(3) | BIT(1) | BIT(0), }, There's no change in how things _behave_ for spi_device nodes with a single mcp23s08 chip. New multi-chip configurations assign GPIOs in sequence, without holes. The spi_device just resembles a bigger controller, but internally it has multiple gpio_chip instances. Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8f388d8dc8d4f36539dd37c1fff62cc404ea0fc Author: David Brownell Date: Fri Jul 25 01:46:07 2008 -0700 gpio: sysfs interface This adds a simple sysfs interface for GPIOs. /sys/class/gpio /export ... asks the kernel to export a GPIO to userspace /unexport ... to return a GPIO to the kernel /gpioN ... for each exported GPIO #N /value ... always readable, writes fail for input GPIOs /direction ... r/w as: in, out (default low); write high, low /gpiochipN ... for each gpiochip; #N is its first GPIO /base ... (r/o) same as N /label ... (r/o) descriptive, not necessarily unique /ngpio ... (r/o) number of GPIOs; numbered N .. N+(ngpio - 1) GPIOs claimed by kernel code may be exported by its owner using a new gpio_export() call, which should be most useful for driver debugging. Such exports may optionally be done without a "direction" attribute. Userspace may ask to take over a GPIO by writing to a sysfs control file, helping to cope with incomplete board support or other "one-off" requirements that don't merit full kernel support: echo 23 > /sys/class/gpio/export ... will gpio_request(23, "sysfs") and gpio_export(23); use /sys/class/gpio/gpio-23/direction to (re)configure it, when that GPIO can be used as both input and output. echo 23 > /sys/class/gpio/unexport ... will gpio_free(23), when it was exported as above The extra D-space footprint is a few hundred bytes, except for the sysfs resources associated with each exported GPIO. The additional I-space footprint is about two thirds of the current size of gpiolib (!). Since no /dev node creation is involved, no "udev" support is needed. Related changes: * This adds a device pointer to "struct gpio_chip". When GPIO providers initialize that, sysfs gpio class devices become children of that device instead of being "virtual" devices. * The (few) gpio_chip providers which have such a device node have been updated. * Some gpio_chip drivers also needed to update their module "owner" field ... for which missing kerneldoc was added. * Some gpio_chips don't support input GPIOs. Those GPIOs are now flagged appropriately when the chip is registered. Based on previous patches, and discussion both on and off LKML. A Documentation/ABI/testing/sysfs-gpio update is ready to submit once this merges to mainline. [akpm@linux-foundation.org: a few maintenance build fixes] Signed-off-by: David Brownell Cc: Guennadi Liakhovetski Cc: Greg KH Cc: Kay Sievers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b6dd986823a8d92ed9f54baa5cef8604d9d9d44 Author: Abhishek Sagar Date: Fri Jul 25 01:46:05 2008 -0700 kprobes: remove redundant config check I noticed that there's a CONFIG_KPROBES check inside kernel/kprobes.c, which is redundant. Signed-off-by: Abhishek Sagar Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef53d9c5e4da147ecaa43c44c5e5945eb83970a2 Author: Srinivasa D S Date: Fri Jul 25 01:46:04 2008 -0700 kprobes: improve kretprobe scalability with hashed locking Currently list of kretprobe instances are stored in kretprobe object (as used_instances,free_instances) and in kretprobe hash table. We have one global kretprobe lock to serialise the access to these lists. This causes only one kretprobe handler to execute at a time. Hence affects system performance, particularly on SMP systems and when return probe is set on lot of functions (like on all systemcalls). Solution proposed here gives fine-grain locks that performs better on SMP system compared to present kretprobe implementation. Solution: 1) Instead of having one global lock to protect kretprobe instances present in kretprobe object and kretprobe hash table. We will have two locks, one lock for protecting kretprobe hash table and another lock for kretporbe object. 2) We hold lock present in kretprobe object while we modify kretprobe instance in kretprobe object and we hold per-hash-list lock while modifying kretprobe instances present in that hash list. To prevent deadlock, we never grab a per-hash-list lock while holding a kretprobe lock. 3) We can remove used_instances from struct kretprobe, as we can track used instances of kretprobe instances using kretprobe hash table. Time duration for kernel compilation ("make -j 8") on a 8-way ppc64 system with return probes set on all systemcalls looks like this. cacheline non-cacheline Un-patched kernel aligned patch aligned patch =============================================================================== real 9m46.784s 9m54.412s 10m2.450s user 40m5.715s 40m7.142s 40m4.273s sys 2m57.754s 2m58.583s 3m17.430s =========================================================== Time duration for kernel compilation ("make -j 8) on the same system, when kernel is not probed. ========================= real 9m26.389s user 40m8.775s sys 2m7.283s ========================= Signed-off-by: Srinivasa DS Signed-off-by: Jim Keniston Acked-by: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: David S. Miller Cc: Masami Hiramatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53a9600c634e3bfd6230e0597aca159bf4d4d010 Author: Ben Dooks Date: Fri Jul 25 01:46:03 2008 -0700 mfd: sm501 fix gpio number calculation for upper bank The sm501_gpio_pin2nr() routine returns the wrong values for gpios in the upper bank. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2999209d779573e17468b680f5f267d8cb2a9c7 Author: Ben Dooks Date: Fri Jul 25 01:46:02 2008 -0700 mfd: sm501 build fixes when CONFIG_MFD_SM501_GPIO unset Fix the build problems if CONFIG_MFD_SM501_GPIO is not set, which is generally when there is no gpiolib support available as currently happens on x86 when building PCI SM501. Signed-off-by: Ben Dooks Tested-by: Li Zefan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28130bea3bcfefe3437b0a5dcab786f1f0296953 Author: Ben Dooks Date: Fri Jul 25 01:46:02 2008 -0700 sm501: fixes for akpms comments on gpiolib addition Fixup the comments from the patch that added the gpiolib support from Andrew Morton. These include spotting some missing frees on error or release, and changing a memcpy for a type-safe assingment. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 42cd2366fb9b58cdfc1855be32b31a78e40b2079 Author: Ben Dooks Date: Fri Jul 25 01:46:01 2008 -0700 sm501: gpio I2C support Add support for adding the GPIO based I2C resources. Signed-off-by: Ben Dooks Cc: Arnaud Patard Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 60e540d617b40eb3d37f1dd99c97af588ff9b70b Author: Arnaud Patard Date: Fri Jul 25 01:46:00 2008 -0700 sm501: gpio dynamic registration for PCI devices The SM501 PCI card requires a dyanmic gpio allocation as the number of cards is not known at compile time. Fixup the platform data and registration to deal with this. Acked-by: Ben Dooks Signed-off-by: Arnaud Patard Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f61be273d3699d174bc1438e6804f9f9e52bb932 Author: Ben Dooks Date: Fri Jul 25 01:45:59 2008 -0700 sm501: add gpiolib support Add support for exporting the GPIOs on the SM501 via gpiolib. Signed-off-by: Ben Dooks Cc: Arnaud Patard Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 472dba7d117844c746be97db6be26c2810d79b62 Author: Ben Dooks Date: Fri Jul 25 01:45:58 2008 -0700 sm501: add power control callback Add callback to get or set the power control if the device has the sleep connected to some form of GPIO. Signed-off-by: Ben Dooks Cc: Arnaud Patard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 717115e1a5856b57af0f71e1df7149108294fc10 Author: Dave Young Date: Fri Jul 25 01:45:58 2008 -0700 printk ratelimiting rewrite All ratelimit user use same jiffies and burst params, so some messages (callbacks) will be lost. For example: a call printk_ratelimit(5 * HZ, 1) b call printk_ratelimit(5 * HZ, 1) before the 5*HZ timeout of a, then b will will be supressed. - rewrite __ratelimit, and use a ratelimit_state as parameter. Thanks for hints from andrew. - Add WARN_ON_RATELIMIT, update rcupreempt.h - remove __printk_ratelimit - use __ratelimit in net_ratelimit Signed-off-by: Dave Young Cc: "David S. Miller" Cc: "Paul E. McKenney" Cc: Dave Young Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2711b793eb62a5873a0ba583a69252040aef176e Author: Vegard Nossum Date: Fri Jul 25 01:45:56 2008 -0700 kallsyms: unify 32- and 64-bit code Use the %p format string which already accounts for the padding you need with a pointer type on a particular architecture. Also replace the macro with a static inline function to match the rest of the file. Cc: Heiko Carstens Cc: Arjan van de Ven Signed-off-by: Vegard Nossum Cc: Sam Ravnborg Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 924d9addb9b1474fc81a78a5c6706755efea7aaa Author: Dave Jones Date: Fri Jul 25 01:45:55 2008 -0700 list debugging: use WARN() instead of BUG() Arjan noted that the list_head debugging is BUG'ing when it detects corruption. By causing the box to panic immediately, we're possibly losing some bug reports. Changing this to a WARN() should mean we at the least start seeing reports collected at kerneloops.org Signed-off-by: Dave Jones Cc: Matthew Wilcox Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d955c78ac4699ac9c3fe07be62982cda13d13267 Author: Arjan van de Ven Date: Fri Jul 25 01:45:55 2008 -0700 Example use of WARN() Now that WARN() exists, we can fold some of the printk's into it. Signed-off-by: Arjan van de Ven Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7a2c477069fbd32f91598f05334003979b987a39 Author: Arjan van de Ven Date: Fri Jul 25 01:45:54 2008 -0700 kernel/irq/manage.c: replace a printk + WARN_ON() to a WARN() Replace a printk+WARN_ON() by a WARN(); this increases the chance of the string making it into the bugreport (ie: it goes inside the ---[ cut here ]--- section) Signed-off-by: Arjan van de Ven Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a8f18b909c0a3f22630846207035c8b84bb252b8 Author: Arjan van de Ven Date: Fri Jul 25 01:45:53 2008 -0700 Add a WARN() macro; this is WARN_ON() + printk arguments Add a WARN() macro that acts like WARN_ON(), with the added feature that it takes a printk like argument that is printed as part of the warning message. [akpm@linux-foundation.org: fix printk arguments] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Arjan van de Ven Cc: Greg KH Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b6c63937001889af6fe431aaba97e59d04e028e7 Author: Arjan van de Ven Date: Fri Jul 25 01:45:52 2008 -0700 Rename WARN() to WARNING() to clear the namespace We want to use WARN() as a variant of WARN_ON(), however a few drivers are using WARN() internally. This patch renames these to WARNING() to avoid the namespace clash. A few cases were defining but not using the thing, for those cases I just deleted the definition. Signed-off-by: Arjan van de Ven Acked-by: Greg KH Cc: Karsten Keil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f38954c93c4a548f55d73ac5c1cf5e7f4023bb6c Author: Andrew Morton Date: Fri Jul 25 01:45:52 2008 -0700 drivers/misc/hpilo.c needs CONFIG_PCI m68k allmodconfig: drivers/misc/hpilo.c: In function 'ilo_ccb_close': drivers/misc/hpilo.c:225: error: implicit declaration of function 'pci_free_consistent' drivers/misc/hpilo.c: In function 'ilo_ccb_open': drivers/misc/hpilo.c:244: error: implicit declaration of function 'pci_alloc_consistent' drivers/misc/hpilo.c:245: warning: assignment makes pointer from integer without a cast Cc: David Altobelli Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7f371e54fac49ff62bb640d4a7276fca01527e8 Author: Johannes Weiner Date: Fri Jul 25 01:45:51 2008 -0700 documentation: update CodingStyle tips for Emacs users Describe a setup that integrates better with Emacs' cc-mode and also fixes up the alignment of continuation lines to really only use tabs. Signed-off-by: Johannes Weiner Cc: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 197dcffc8ba0ea943fee86e28e99cd9575799772 Author: Daniel Guilak Date: Fri Jul 25 01:45:50 2008 -0700 init/version.c: define version_string only if CONFIG_KALLSYMS is not defined int Version_* is only used with ksymoops, which is only needed (according to README and Documentation/Changes) if CONFIG_KALLSYMS is NOT defined. Therefore this patch defines version_string only if CONFIG_KALLSYMS is not defined. Signed-off-by: Daniel Guilak Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 277e2c695907a70b316a31769cd891dc4d43b7f3 Author: Daniel Guilak Date: Fri Jul 25 01:45:49 2008 -0700 init/version.c: silence sparse warning by declaring the version string Signed-off-by: Daniel Guilak Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4500d067eeb3d00679335d9cf5c6536e79cd3ef4 Author: Robert P. J. Day Date: Fri Jul 25 01:45:49 2008 -0700 init.h: remove obsolete content Remove apparently obsolete content from init.h referring to gcc 2.9x and to "no_module_init". Signed-off-by: Robert P. J. Day Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db358b40e0674fd4079204d8e3e1c8ab3829a1b9 Author: Kay Sievers Date: Fri Jul 25 01:45:48 2008 -0700 parport: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS with "platform:"), the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable parport platform drivers, to re-enable auto loading. Signed-off-by: Kay Sievers Signed-off-by: David Brownell Cc: Greg KH Cc: "Rafael J. Wysocki" Acked-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4f46d6e7e5ffbce0ee1d1a80767fdf45e56cc863 Author: Kay Sievers Date: Fri Jul 25 01:45:47 2008 -0700 mfd: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS with "platform:"), the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the MFD platform drivers, to re-enable auto loading. [dbrownell@users.sourceforge.net: one was missing] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Cc: Greg KH Cc: "Rafael J. Wysocki" Cc: Samuel Ortiz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f5a5cf93fae7b8354b45b8443dcc3448a8fc276 Author: Kay Sievers Date: Fri Jul 25 01:45:46 2008 -0700 drivers/power: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf ("platform: prefix MODALIAS with "platform:"), the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable "power" drivers drivers, to re-enable auto loading. [dbrownell@users.sourceforge.net: one was missing] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Cc: Greg KH Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d6ffcca623a9a16df6cdfbe8250b7a5904a5f5e Author: Thomas Petazzoni Date: Fri Jul 25 01:45:44 2008 -0700 inflate: refactor inflate malloc code Inflate requires some dynamic memory allocation very early in the boot process and this is provided with a set of four functions: malloc/free/gzip_mark/gzip_release. The old inflate code used a mark/release strategy rather than implement free. This new version instead keeps a count on the number of outstanding allocations and when it hits zero, it resets the malloc arena. This allows removing all the mark and release implementations and unifying all the malloc/free implementations. The architecture-dependent code must define two addresses: - free_mem_ptr, the address of the beginning of the area in which allocations should be made - free_mem_end_ptr, the address of the end of the area in which allocations should be made. If set to 0, then no check is made on the number of allocations, it just grows as much as needed The architecture-dependent code can also provide an arch_decomp_wdog() function call. This function will be called several times during the decompression process, and allow to notify the watchdog that the system is still running. If an architecture provides such a call, then it must define ARCH_HAS_DECOMP_WDOG so that the generic inflate code calls arch_decomp_wdog(). Work initially done by Matt Mackall, updated to a recent version of the kernel and improved by me. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Thomas Petazzoni Cc: Matt Mackall Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Mikael Starvik Cc: Jesper Nilsson Cc: Haavard Skinnemoen Cc: David Howells Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andi Kleen Cc: "H. Peter Anvin" Acked-by: Paul Mundt Acked-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ba92a43dbaee339cf5915ef766d3d3ffbaaf103c Author: Hugh Dickins Date: Fri Jul 25 01:45:43 2008 -0700 exec: remove some includes fs/exec.c used to need mman.h pagemap.h swap.h and rmap.h when it did mm-ish stuff in install_arg_page(); but no need for them after 2.6.22. [akpm@linux-foundation.org: unbreak arm] Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b4bc46052ea8cd7c370b67ca0b9c26586f1439a Author: OGAWA Hirofumi Date: Fri Jul 25 01:45:42 2008 -0700 pdflush: use time_after() instead of open-coding it Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b69c49b78457f681ecfb3147bd968434ee6559c1 Author: FUJITA Tomonori Date: Fri Jul 25 01:45:40 2008 -0700 clean up duplicated alloc/free_thread_info We duplicate alloc/free_thread_info defines on many platforms (the majority uses __get_free_pages/free_pages). This patch defines common defines and removes these duplicated defines. __HAVE_ARCH_THREAD_INFO_ALLOCATOR is introduced for platforms that do something different. Signed-off-by: FUJITA Tomonori Acked-by: Russell King Cc: Pekka Enberg Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 62ec30d45ecbb85b5991474c8f04192697687495 Author: Matthew Garrett Date: Fri Jul 25 01:45:39 2008 -0700 misc: add HP WMI laptop extras driver This driver adds support for reading and configuring certain information on modern HP laptops with WMI BIOS interfaces. It supports enabling and disabling the ambient light sensor, querying attached displays and hard drive temperature, sending events on docking and querying the state of the dock and toggling the state of the wifi, bluetooth and wwan hardware via rfkill. It also makes the little "(i)" button work on machines that send that via WMI rather than via the keyboard controller. Signed-off-by: Matthew Garrett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ac331d158e198d2a91a5b0a3ec4ca9991fdb57af Author: KOSAKI Motohiro Date: Fri Jul 25 01:45:38 2008 -0700 call_usermodehelper(): increase reliability Presently call_usermodehelper_setup() uses GFP_ATOMIC. but it can return NULL _very_ easily. GFP_ATOMIC is needed only when we can't sleep. and, GFP_KERNEL is robust and better. thus, I add gfp_mask argument to call_usermodehelper_setup(). So, its callers pass the gfp_t as below: call_usermodehelper() and call_usermodehelper_keys(): depend on 'wait' argument. call_usermodehelper_pipe(): always GFP_KERNEL because always run under process context. orderly_poweroff(): pass to GFP_ATOMIC because may run under interrupt context. Signed-off-by: KOSAKI Motohiro Cc: "Paul Menage" Reviewed-by: Li Zefan Acked-by: Jeremy Fitzhardinge Cc: Rusty Russell Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f557d0996a6f9c06912528ea85e1dba0fb7d485f Author: Adrian Bunk Date: Fri Jul 25 01:45:37 2008 -0700 remove some more tipar bits Some bits were missed when the tipar driver was removed. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f16695f4ac088cf7593e113574046d2d7e5af5eb Author: Adrian Bunk Date: Fri Jul 25 01:45:36 2008 -0700 asm-generic/int-ll64.h: always provide __{s,u}64 Several compilers offer "long long" without claiming to support C99. Considering how frequent __s64/__u64 are used our userspace headers are anyway unusable without __s64/__u64 available. Always offer __s64/__u64 to non-gcc non-C99 compilers - if they provide "long long" that makes the headers compiling and if they don't they are anyway screwed. Signed-off-by: Adrian Bunk Acked-by: H. Peter Anvin Cc: Harvey Harrison Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cebbd3fb803603b12408458ba17c29ce1e15a5f2 Author: Andrew Morton Date: Fri Jul 25 01:45:35 2008 -0700 build-kernel-profileo-only-when-requested-cleanups Cc: Adrian Bunk Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b03f6489f9f27dc519a4c60ebf39cc7b8a58eae7 Author: Adrian Bunk Date: Fri Jul 25 01:45:35 2008 -0700 build kernel/profile.o only when requested Build kernel/profile.o only if CONFIG_PROFILING is enabled. This makes CONFIG_PROFILING=n kernels smaller. As a bonus, some profile_tick() calls and one branch from schedule() are now eliminated with CONFIG_PROFILING=n (but I doubt these are measurable effects). This patch changes the effects of CONFIG_PROFILING=n, but I don't think having more than two choices would be the better choice. This patch also adds the name of the first parameter to the prototypes of profile_{hits,tick}() since I anyway had to add them for the dummy functions. Signed-off-by: Adrian Bunk Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 696adfe84c11c571a1e0863460ff0ec142b4e5a9 Author: Paul E. McKenney Date: Fri Jul 25 01:45:34 2008 -0700 list_for_each_rcu must die: networking All uses of list_for_each_rcu() can be profitably replaced by the easier-to-use list_for_each_entry_rcu(). This patch makes this change for networking, in preparation for removing the list_for_each_rcu() API entirely. Acked-by: David S. Miller Signed-off-by: Paul E. McKenney Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2fc9c4e18f94431e7eb77d97edb2a995b46fba55 Author: Vegard Nossum Date: Fri Jul 25 01:45:34 2008 -0700 kallsyms: fix potential overflow in binary search This will probably never trigger... but it won't hurt to be careful. http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html Signed-off-by: Vegard Nossum Cc: Joshua Bloch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 58340a07c194e0aed7bc58b61ff24330bb2a409f Author: Johannes Berg Date: Fri Jul 25 01:45:33 2008 -0700 introduce HAVE_EFFICIENT_UNALIGNED_ACCESS Kconfig symbol In many cases, especially in networking, it can be beneficial to know at compile time whether the architecture can do unaligned accesses efficiently. This patch introduces a new Kconfig symbol HAVE_EFFICIENT_UNALIGNED_ACCESS for that purpose and adds it to the powerpc and x86 architectures. Also add some documentation about alignment and networking, and especially one intended use of this symbol. Signed-off-by: Johannes Berg Acked-by: Sam Ravnborg Acked-by: Ingo Molnar [x86 architecture part] Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0ce0da9fefcc723dc006c35a7f91a32750abd40 Author: Robert P. J. Day Date: Fri Jul 25 01:45:32 2008 -0700 lists: remove a redundant conditional definition of list_add() Remove the conditional surrounding the definition of list_add() from list.h since, if you define CONFIG_DEBUG_LIST, the definition you will subsequently pick up from lib/list_debug.c will be absolutely identical, at which point you can remove that redundant definition from list_debug.c as well. Signed-off-by: Robert P. J. Day Cc: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fd193829744bc77392395cf8f47889235c97f0a3 Author: Robert P. J. Day Date: Fri Jul 25 01:45:31 2008 -0700 lib: allow memparse() to accept a NULL and ignorable second parm Extend memparse() to allow the caller to use a NULL second parameter, which would represent no interest in returning the address of the end of the parsed string. In numerous cases, callers invoke memparse() to parse a possibly-suffixed string (such as "64K" or "2G" or whatever) and define a character pointer to accept the end pointer being returned by memparse() even though they have no interest in it and promptly throw it away. This (backward-compatible) enhancement allows callers to use NULL in the cases where they just don't care about getting back that end pointer. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Robert P. J. Day Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb345d7352aa9e692ef4b83c41d3e6e1cdb2f846 Author: Robert P. J. Day Date: Fri Jul 25 01:45:30 2008 -0700 init/: delete hard-coded setting and testing of BUILD_CRAMDISK There seems to be little point in explicitly setting, then testing the macro BUILD_CRAMDISK within the context of a single source file. Signed-off-by: Robert P. J. Day Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b39c08cb692cb8898c30e0d8187c7cbe27cc905c Author: Robert P. J. Day Date: Fri Jul 25 01:45:29 2008 -0700 Remove apparently unused fd1772.h header file. This header file has been unused for quite some time, and the corresponding source files appear to have been removed back in commit 99eb8a550dbccc0e1f6c7e866fe421810e0585f6 ("Remove the arm26 port") Signed-off-by: Robert P. J. Day Cc: Adrian Bunk Cc: Ian Molton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 82c8253ac27291d6c70114eb445c714359812a10 Author: Adrian Bunk Date: Fri Jul 25 01:45:29 2008 -0700 init/do_mounts.c should #include Every file should include the headers containing the externs for its global code (in this case for rd_doload). Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit abddaec56ebb7911bbf0578a4636a74bd7376d92 Author: Eric Sandeen Date: Fri Jul 25 01:45:28 2008 -0700 fix checkstack.pl arch detection uname -m was leaving a newline in $arch, and not passing the tests. Also, printing the unknown arch on failure is probably helpful. Signed-off-by: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 585e93ae83b80c874bf4eb50a239027cef5db4af Author: Eric Sandeen Date: Fri Jul 25 01:45:27 2008 -0700 find dynamic stack allocations in checkstack.pl Currently, checkstack.pl only looks for fixed subtractions from the stack pointer. However, things like this: void function(int size) { char stackbuster[size << 2]; ... are certainly worth pointing out, I think. This could perhaps be done more cleanly, and the following patch only adds "dynamic" REs for x86 and x86_64, but it works: 0x00b0 crypto_cbc_decrypt_inplace [cbc]: Dynamic (%rax) 0x00ad crypto_pcbc_decrypt_inplace [pcbc]: Dynamic (%rax) 0x02f6 crypto_pcbc_encrypt_inplace [pcbc]: Dynamic (%rax) 0x036c _crypto_xcbc_digest_setkey [xcbc]: Dynamic (%rax) ... (Inspired by Keith Owens' old stack-check script) Signed-off-by: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 545e400619b24b6b17b7f1f1e838e9ff6d036949 Author: Harvey Harrison Date: Fri Jul 25 01:45:27 2008 -0700 lzo: use get/put_unaligned_* helpers Signed-off-by: Harvey Harrison Acked-by: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b5ac31e27135a6f2c210c40d03bf8f1b3a86b77 Author: Harvey Harrison Date: Fri Jul 25 01:45:26 2008 -0700 include: use get/put_unaligned_* helpers Signed-off-by: Harvey Harrison Cc: "John W. Linville" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b7bbf8fa6ba329b3552b75a0716f5fbc6f839499 Author: Harvey Harrison Date: Fri Jul 25 01:45:25 2008 -0700 fs: ldm.[ch] use get_unaligned_* helpers Replace the private BE16/BE32/BE64 macros with direct calls to get_unaligned_be16/32/64. Signed-off-by: Harvey Harrison Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f307891ce0e7b0438c432af1aacd656a092ff45 Author: Steven Rostedt Date: Fri Jul 25 01:45:25 2008 -0700 locking: add typecheck on irqsave and friends for correct flags There haave been several areas in the kernel where an int has been used for flags in local_irq_save() and friends instead of a long. This can cause some hard to debug problems on some architectures. This patch adds a typecheck inside the irqsave and restore functions to flag these cases. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: build fix] Signed-off-by: Steven Rostedt Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0deaff470900a4c3222ca7139f6c9639e26a2f5 Author: Andrew Morton Date: Fri Jul 25 01:45:24 2008 -0700 split the typecheck macros out of include/linux/kernel.h Needed to fix up a recursive include snafu in locking-add-typecheck-on-irqsave-and-friends-for-correct-flags.patch Cc: Steven Rostedt Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5df439ef06d4173357711a04740aa8bfcf50d621 Author: Wang Chen Date: Fri Jul 25 01:45:23 2008 -0700 flag parameters: fix compile error of sys_epoll_create1 GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD vmlinux arch/x86/kernel/built-in.o: In function `sys_call_table': (.rodata+0x8a4): undefined reference to `sys_epoll_create1' make: *** [vmlinux] Error 1 Signed-off-by: Wang Chen Cc: Ulrich Drepper Cc: Davide Libenzi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c82dd5321cf779f1f536ef26b383cbe8c9de7f10 Author: Andrew Morton Date: Fri Jul 25 01:45:22 2008 -0700 mfd: don't use memzero For it doesn't exist on i386. Cc: Ian Molton Cc: Dmitry Baryshkov Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 51a379d0c8f7a6db7c9e3c9c770d90a6d2d1ef9b Author: Jack Morgenstein Date: Fri Jul 25 10:32:52 2008 -0700 mlx4: Update/add Mellanox Technologies copyright lines to mlx4 driver files Update existing Mellanox copyright lines to 2008, and add such lines to files where they are missing. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit 25c94d010a8ae8605dc4d5453e0c82fa97da5d12 Author: Yevgeny Petrilin Date: Fri Jul 25 10:30:06 2008 -0700 mlx4_core: Add VLAN tag field to WQE control segment struct Add fields for VLAN tag and insert VLAN tag flag to the control section struct. These fields will be used for sending ethernet packets. Signed-off-by: Yevgeny Petrilin Signed-off-by: Roland Dreier commit 3e4d0cab61c88a9ae3e61151a857960397e26403 Author: Tony Luck Date: Fri Jul 25 10:10:28 2008 -0700 [IA64] Wire up new system calls Six new system calls: signalfd4, eventfd2, epoll_create1, dup3, pipe2 and inotify_init1. Signed-off-by: Tony Luck commit 3d6f4a20cc287a8980c6186624834cf10a70752b Author: David Miller Date: Thu Jul 24 23:38:31 2008 -0700 endian: Always evaluate arguments. Changeset 7fa897b91a3ea0f16c2873b869d7a0eef05acff4 ("ide: trivial sparse annotations") created an IDE bootup regression on big-endian systems. In drivers/ide/ide-iops.c, function ide_fixstring() we now have the loop: for (p = end ; p != s;) be16_to_cpus((u16 *)(p -= 2)); which will never terminate on big-endian because in such a configuration be16_to_cpus() evaluates to "do { } while (0)" Therefore, always evaluate the arguments to nop endian transformation operations. Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds commit 43de804df8d6002059bf4af4522fa9273a19b8aa Author: Huang Weiyi Date: Fri Jul 25 23:30:15 2008 +0800 char/xilinx_hwicap/xilinx_hwicap.c: Removed duplicated include Removed duplicated include file in char/xilinx_hwicap/xilinx_hwicap.c. Signed-off-by: Huang Weiyi Signed-off-by: Linus Torvalds commit 29b309e52d3d51ef8a15bd15590903cf272beb93 Author: Linus Torvalds Date: Fri Jul 25 09:19:36 2008 -0700 Undo duplicate "m68k: drivers/input/serio/hp_sdc.c needs " Both commits 0f17e4c796e89d1f69f13b653aba60e6ccfb8ae0 ("Add missing semaphore.h includes") and 4933d07531711e399d8d578036aa9fc1be2f9b20 ("m68k: drivers/input/serio/hp_sdc.c needs ") added a We only really need one ;) Reported-by: Huang Weiyi Requested-by: Dmitry Torokhov Signed-off-by: Linus Torvalds commit 3d45955962496879dead8d4dd70bb9a23b07154b Author: Alexey Korolev Date: Thu May 15 17:23:18 2008 +0100 [MTD] [NAND] subpage read feature as a way to increase performance. This patch enables NAND subpage read functionality. If upper layer drivers are requesting to read non page aligned data NAND subpage-read functionality reads the only whose ECC regions which include requested data when original code reads whole page. This significantly improves performance in many cases. Here are some digits : UBI volume mount time No subpage reads: 5.75 seconds Subpage read patch: 2.42 seconds Open/stat time for files on JFFS2 volume: No subpage read 0m 5.36s Subpage read 0m 2.88s Signed-off-by Alexey Korolev Acked-by: Artem Bityutskiy Acked-by: Jörn Engel Signed-off-by: David Woodhouse commit ff877ea80efa2015b6263766f78ee42c2a1b32f9 Merge: 30821fe... d37e6bf... Author: David Woodhouse Date: Fri Jul 25 10:40:14 2008 -0400 Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 commit 30821fee4f0cb3e6d241d9f7ddc37742212e3eb7 Author: Ben Dooks Date: Tue Jul 15 11:58:31 2008 +0100 CPUFREQ: S3C24XX NAND driver frequency scaling support. Add support for CPU frequency scalling to the S3C24XX NAND driver. Signed-off-by: Ben Dooks Signed-off-by: David Woodhouse commit ee39a0e61b8a307576b5e26057f8257444b5c9c1 Author: Yoichi Yuasa Date: Tue Jul 15 23:04:35 2008 +0900 [MTD][NAND] au1550nd: remove unused variable Remove unused variable from au1550 NAND driver. Signed-off-by: Yoichi Yuasa Signed-off-by: David Woodhouse commit ca6f12c67ed19718cf37d0f531af9438de85b70c Author: Atsushi Nemoto Date: Wed Jul 16 00:09:15 2008 +0900 [MTD] jedec_probe: Fix SST 16-bit chip detection The unlock_addr rework in kernel 2.6.25 breaks 16-bit SST chips. SST 39LF160 and SST 39VF1601 are both 16-bit only chip (do not have BYTE# pin) and new uaddr value is not correct for them. Add MTD_UADDR_0xAAAA_0x5555 for those chips. Tested with SST 39VF1601 chip. Signed-off-by: Atsushi Nemoto Signed-off-by: David Woodhouse commit f636ffb420f0f9059c1d0b841afd691657246ad6 Author: Atsushi Nemoto Date: Sat Jul 19 01:01:22 2008 +0900 [MTD][MTDPART] Fix a division by zero bug When detecting a partition beyond the end of the device, skip most of the initialisation, in particular those bits causing a division by zero. Signed-off-by: Jörn Engel Signed-off-by: Atsushi Nemoto Signed-off-by: David Woodhouse commit 6910c1368104d50e6b6afc6c8b7e9d1670a374e7 Author: Atsushi Nemoto Date: Sat Jul 19 01:00:57 2008 +0900 [MTD][MTDPART] Cleanup and document the erase region handling Mostly simplifying the loops. Now everything fits into 80 columns, is easier to read and the finer details have extra comments. Signed-off-by: Jörn Engel Signed-off-by: Atsushi Nemoto Signed-off-by: David Woodhouse commit b33a2887396a1a5207e56459f62c4b132294ca58 Author: Atsushi Nemoto Date: Sat Jul 19 01:00:33 2008 +0900 [MTD][MTDPART] Handle most checkpatch findings Remaining are 12 warnings about long lines and 1 about braces that could be argued about. Signed-off-by: Jörn Engel Signed-off-by: Atsushi Nemoto Signed-off-by: David Woodhouse commit 7788ba71a6046de1b70e7dd45ed0bc5768a4bbd9 Author: Atsushi Nemoto Date: Sat Jul 19 01:00:18 2008 +0900 [MTD][MTDPART] Seperate main loop from per-partition code in add_mtd_partition add_mtd_partition was a 150+ line monster consisting mostly of a single loop. Seperate the loop from most of the body. Now it should be obvious which variables are carried around from iteration to iteration. Signed-off-by: Jörn Engel Signed-off-by: Atsushi Nemoto Signed-off-by: David Woodhouse commit 4b5e33a7bf185c8d8568a807d9805fb155bcedd9 Author: Uwe Kleine-König Date: Tue Jul 22 09:39:01 2008 +0200 [MTD] physmap: resume already suspended chips on failure to suspend A nice side effect of this patch is that the return value of physmap_flash_suspend in the error path is the value of the first failing suspend callback and not the bitwise OR of all of them. Signed-off-by: Uwe Kleine-König Signed-off-by: David Woodhouse commit 7b2491911540e4904498622fbee2e1a9e3120d2f Author: Robert Jarzmik Date: Tue Jul 22 09:39:00 2008 +0200 [MTD] physmap: Fix suspend/resume/shutdown bugs. Don't call suspend/resume functions if they have not been defined. Signed-off-by: Robert Jarzmik Acked-By: Jörn Engel Signed-off-by: Uwe Kleine-König Signed-off-by: David Woodhouse commit 998453fbf2e0709bf65ac419718ad284401b2b4f Author: Alexey Korolev Date: Wed Jul 16 15:28:56 2008 +0100 [MTD] [NOR] Fix -ETIMEO errors in CFI driver Existing CFI driver has problems with excessive writes during erase. If CFI driver does many writes during one erase cycle we may face the messages with -ETIMEO error on erase operation. It may cause the following data corruption and kernel panics. The reason of the issue is related to specifics of suspend operation: if we write to flash during erase, suspend operation will cost some time to erase procedure (for P30 it could be significant). In current version of cfi driver the problem of many suspends is partially workarounded by adding some time reserv to any operation (8xerase_time) but if we have many writes during one erase the problem appears. This patch detects the suspend and resets timer if suspend occured. It has been well verified on different chips. No problems were found. Could you please include the patch as it is simple and fixes bad issue. Signed-off-by: Alexey Korolev Signed-off-by: David Woodhouse commit 55679df30dfa37886cd9e22d8dea0e6974a552df Author: Anton Vorontsov Date: Mon Jul 14 19:20:37 2008 +0400 [MTD] [NAND] fsl_elbc_nand: fix section mismatch with CONFIG_MTD_OF_PARTS=y With CONFIG_MTD_OF_PARTS=y I'm getting this new section mismatch in reference from the function fsl_elbc_chip_probe() to the function .devinit.text:of_mtd_parse_partitions() This patch fixes the mismatch by providing __devinit annotation to the fsl_elbc_chip_probe() function. Signed-off-by: Anton Vorontsov Acked-By: Scott Wood Signed-off-by: David Woodhouse commit 7d7e5a60c62e88cb8782760bb6c4d3bd1577a6c6 Author: Herbert Xu Date: Fri Jul 25 02:55:33 2008 -0700 ipsec: ipcomp - Decompress into frags if necessary When decompressing extremely large packets allocating them through kmalloc is prone to failure. Therefore it's better to use page frags instead. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 6fccab671f2f0a24b799f29a4ec878f62d34656c Author: Herbert Xu Date: Fri Jul 25 02:54:40 2008 -0700 ipsec: ipcomp - Merge IPComp implementations This patch merges the IPv4/IPv6 IPComp implementations since most of the code is identical. As a result future enhancements will no longer need to be duplicated. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit d37e6bf68fc1eb34a4ad21d9ae8890ed37ea80e7 Author: Artem Bityutskiy Date: Thu Jul 24 18:28:11 2008 +0300 UBI: always start the background thread This fix only affects UBI debugging. If the the background thread is disabled for debugging purposes, start it anyway, because otherwise we see tonns of kernel debugging complaints like this: INFO: task ubi_bgt0d:26857 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. ubi_bgt0d D dd37bf94 0 26857 2 dd37bfcc 00000086 f8e17cea dd37bf94 00000046 00000000 00000000 f5c62430 f5c62430 f5c62590 c2a09c80 f6cbd498 dd8e9cbc 00000296 dd37bfb0 00000296 dd8e9cb8 dd8e9cbc dd37bfcc c0119774 00000000 00000000 c0132e89 f6961560 Call Trace: [] ? ubi_thread+0x0/0x127 [ubi] [] ? complete+0x43/0x4b [] ? kthread+0x0/0x5b [] ? ubi_thread+0x0/0x127 [ubi] [] kthread+0x25/0x5b [] ? kthread+0x0/0x5b [] kernel_thread_helper+0x7/0x14 ======================= So start it, and go sleep inside it, instead of creating it and never start. Signed-off-by: Artem Bityutskiy commit cffe1c5d7a5a1e54f7c2c6d0510f651a965bccc3 Author: David S. Miller Date: Fri Jul 25 01:25:04 2008 -0700 pkt_sched: Fix locking in shutdown_scheduler_queue() Qdisc locks need to be held with BH disabled. Tested-by: Ingo Molnar Signed-off-by: David S. Miller commit 973b7d83ebeb1e34b8bee69208916e5f0e2353c3 Author: Tony Breeds Date: Fri Jul 25 16:21:51 2008 +1000 powerpc: Wireup new syscalls signalfd4, eventfd2, epoll_create1, dup3, pipe2 and inotify_init1 Signed-off-by: Tony Breeds Signed-off-by: Benjamin Herrenschmidt commit 1e3519f8e1baec0b733cd42684fcd3d9681662f1 Author: Benjamin Herrenschmidt Date: Fri Jul 25 16:21:11 2008 +1000 Move update_mmu_cache() declaration from tlbflush.h to pgtable.h where it belongs. This fixes some build problems on some configs Signed-off-by: Benjamin Herrenschmidt commit 16c14b4621c7b6fc4611abf1f86cd78cdb1b2b03 Author: Nathan Fontenot Date: Thu Jul 24 05:10:46 2008 +1000 powerpc/pseries: Remove kmalloc call in handling writes to lparcfg There are only 4 valid name=value pairs for writes to /proc/ppc64/lparcfg. Current code allocates a buffer to copy this information in from the user. Since the longest name=value pair will easily fit into a buffer of 64 characters, simply put the buffer on the stack instead of allocating the buffer. Signed-off-by: Nathan Fotenot Signed-off-by: Benjamin Herrenschmidt commit 8391e42a5c1f3d757faa5e7f46a4a68f9aa6cb12 Author: Nathan Fontenot Date: Thu Jul 24 04:36:38 2008 +1000 powerpc/pseries: Update arch vector to indicate support for CMO Update the architecture vector to indicate that Cooperative Memory Overcommitment is supported if CONFIG_PPC_SMLPAR is set. Signed-off-by: Nathan Fontenot Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 39c1ffecc6aabcc8105602a95ce769f27bcf6048 Author: Brian King Date: Thu Jul 24 04:35:48 2008 +1000 ibmvfc: Add support for collaborative memory overcommit Adds support to the ibmvfc driver for collaborative memory overcommit. Signed-off-by: Brian King Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 7912a0ac5907df1f8b214b3ca15ccf96129daae0 Author: Robert Jennings Date: Thu Jul 24 04:35:27 2008 +1000 ibmvscsi: driver enablement for CMO Enable the driver to function in a Cooperative Memory Overcommitment (CMO) environment. The following changes are made to enable the driver for CMO: * DMA mapping errors will not result in error messages if entitlement has been exceeded and resources were not available. * The driver has a get_desired_dma function defined to function in a CMO environment. It will indicate how much IO memory it would like to function. Signed-off-by: Robert Jennings Acked by: Brian King Acked-by: Paul Mackerras Acked-by: James Bottomley Signed-off-by: Benjamin Herrenschmidt commit 1096d63d8e7d226630706e15648705d0187787e4 Author: Robert Jennings Date: Thu Jul 24 04:34:52 2008 +1000 ibmveth: enable driver for CMO Enable ibmveth for Cooperative Memory Overcommitment (CMO). For this driver it means calculating a desired amount of IO memory based on the current MTU and updating this value with the bus when MTU changes occur. Because DMA mappings can fail, we have added a bounce buffer for temporary cases where the driver can not map IO memory for the buffer pool. The following changes are made to enable the driver for CMO: * DMA mapping errors will not result in error messages if entitlement has been exceeded and resources were not available. * DMA mapping errors are handled gracefully, ibmveth_replenish_buffer_pool() is corrected to check the return from dma_map_single and fail gracefully. * The driver will have a get_desired_dma function defined to function in a CMO environment. * When the MTU is changed, the driver will update the device IO entitlement Signed-off-by: Robert Jennings Signed-off-by: Brian King Signed-off-by: Santiago Leon Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit ea866e6526b8a2ead92875732d41b26fdb470312 Author: Santiago Leon Date: Thu Jul 24 04:34:23 2008 +1000 ibmveth: Automatically enable larger rx buffer pools for larger mtu Activates larger rx buffer pools when the MTU is changed to a larger value. This patch de-activates the large rx buffer pools when the MTU changes to a smaller value. Signed-off-by: Santiago Leon Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 22e1a4dd3f2a9009d1d8896a5e833b6094877008 Author: Nathan Fontenot Date: Thu Jul 24 04:31:52 2008 +1000 powerpc/pseries: Verify CMO memory entitlement updates with virtual I/O Verify memory entitlement updates can be handled by vio. Signed-off-by: Nathan Fontenot Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit a90ab95a9576d35de0d05f9f4fc435edcccafaa9 Author: Robert Jennings Date: Thu Jul 24 04:31:33 2008 +1000 powerpc/pseries: vio bus support for CMO This is a large patch but the normal code path is not affected. For non-pSeries platforms the code is ifdef'ed out and for non-CMO enabled pSeries systems this does not affect the normal code path. Devices that do not perform DMA operations do not need modification with this patch. The function get_desired_dma was renamed from get_io_entitlement for clarity. Overview Cooperative Memory Overcommitment (CMO) allows for a set of OS partitions to be run with less RAM than the aggregate needs of the group of partitions. The firmware will balance memory between the partitions and page in/out memory as needed. Based on the number and type of IO adpaters preset each partition is allocated an amount of memory for DMA operations and this allocation will be guaranteed to the partition; this is referred to as the partition's 'entitlement'. Partitions running in a CMO environment can only have virtual IO devices present. The VIO bus layer will manage the IO entitlement for the system. Accounting, at a system and per-device level, is tracked in the VIO bus code and exposed via sysfs. A set of dma_ops functions are added to the bus to allow for this accounting. Bus initialization At initialization, the bus will calculate the minimum needs of the system based on providing each device present with a standard minimum entitlement along with a spare allocation for the bus to handle hotplug events. If the minimum needs can not be met the system boot will be halted. Device changes The significant changes for devices while running under CMO are that the devices must specify how much dedicated IO entitlement they desire and must also handle DMA mapping errors that can occur due to constrained IO memory. The virtual IO drivers are modified to silence errors when DMA mappings fail for CMO and handle these failures gracefully. Each devices will be guaranteed a minimum entitlement that can always be mapped. Devices will specify how much entitlement they desire and the VIO bus will attempt to provide for this. Devices can change their desired entitlement level at any point in time to address particular needs (via vio_cmo_set_dev_desired()), not just at device probe time. VIO bus changes The system will have a particular entitlement level available from which it can provide memory to the devices. The bus defines two pools of memory within this entitlement, the reserved and excess pools. Each device is provided with it's own entitlement no less than a system defined minimum entitlement and no greater than what the device has specified as it's desired entitlement. The entitlement provided to devices comes from the reserve pool. The reserve pool can also contain a spare allocation as large as the system defined minimum entitlement which is used for device hotplug events. Any entitlement not needed to fulfill the needs of a reserve pool is placed in the excess pool. Each device is guaranteed that it can map up to it's entitled level; additional mapping are possible as long as there is unmapped memory in the excess pool. Bus probe As the system starts, each device is given an entitlement equal only to the system defined minimum entitlement. The reserve pool is equal to the sum of these entitlements, plus a spare allocation. The VIO bus also tracks the aggregate desired entitlement of all the devices. If the system desired entitlement is greater than the size of the reserve pool, when devices unmap IO memory it will be reserved and a balance operation will be scheduled for some time in the future. Entitlement balancing The balance function tries to fairly distribute entitlement between the devices in the system with the goal of providing each device with it's desired amount of entitlement. Devices using more than what would be ideal will have their entitled set-point adjusted; this will effectively set a goal for lower IO memory usage as future mappings can fail and deallocations will trigger a balance operation to distribute the newly unmapped memory. A fair distribution of entitlement can take several balance operations to achieve. Entitlement changes and device DLPAR events will alter the state of CMO and will trigger balance operations. Hotplug events The VIO bus allows for changes in system entitlement at run-time via 'vio_cmo_entitlement_update()'. When devices are added the hotplug device event will be preceded by a system entitlement increase and this is reversed when devices are removed. The following changes are made that the VIO bus layer for CMO: * add IO memory accounting per device structure. * add IO memory entitlement query function to driver structure. * during vio bus probe, if CMO is enabled, check that driver has memory entitlement query function defined. Fail if function not defined. * fail to register driver if io entitlement function not defined. * create set of dma_ops at vio level for CMO that will track allocations and return DMA failures once entitlement is reached. Entitlement will limited by overall system entitlement. Devices will have a reserved quantity of memory that is guaranteed, the rest can be used as available. * expose entitlement, current allocation, desired allocation, and the allocation error counter for devices to the user through sysfs * provide mechanism for changing a device's desired entitlement at run time for devices as an exported function and sysfs tunable * track any DMA failures for entitled IO memory for each vio device. * check entitlement against available system entitlement on device add * track entitlement metrics (high water mark, current usage) * provide function to reset high water mark * provide minimum and desired entitlement numbers at a bus level * provide drivers with a minimum guaranteed entitlement * balance available entitlement between devices to satisfy their needs * handle system entitlement changes and device hotplug Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 6490c4903d12f242bec4454301f76f6a7520e399 Author: Robert Jennings Date: Thu Jul 24 04:31:16 2008 +1000 powerpc/pseries: iommu enablement for CMO To support Cooperative Memory Overcommitment (CMO), we need to check for failure from some of the tce hcalls. These changes for the pseries platform affect the powerpc architecture; patches for the other affected platforms are included in this patch. pSeries platform IOMMU code changes: * platform TCE functions must handle H_NOT_ENOUGH_RESOURCES errors and return an error. Architecture IOMMU code changes: * Calls to ppc_md.tce_build need to check return values and return DMA_MAPPING_ERROR for transient errors. Architecture changes: * struct machdep_calls for tce_build*_pSeriesLP functions need to change to indicate failure. * all other platforms will need updates to iommu functions to match the new calling semantics; they will return 0 on success. The other platforms default configs have been built, but no further testing was performed. Signed-off-by: Robert Jennings Acked-by: Olof Johansson Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit ffa5abbd0c399b32fc13a1b4718d87ee7a716999 Author: Brian King Date: Thu Jul 24 04:30:58 2008 +1000 powerpc/pseries: Add CMO paging statistics With the addition of Cooperative Memory Overcommitment (CMO) support for IBM Power Systems, two fields have been added to the VPA to report paging statistics. Add support in lparcfg to report them to userspace. Signed-off-by: Brian King Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 84af458bb23bf5f0ba1af4320dd2a57f7c4363e5 Author: Brian King Date: Thu Jul 24 04:30:29 2008 +1000 powerpc/pseries: Add collaborative memory manager Adds a collaborative memory manager, which acts as a simple balloon driver for System p machines that support cooperative memory overcommitment (CMO). Adds a platform configuration option for CMO called PPC_SMLPAR. Signed-off-by: Brian King Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 86630a32320f83736c4c24e2c8bae218e4c56c7c Author: Brian King Date: Thu Jul 24 04:29:16 2008 +1000 powerpc/pseries: Utilities to set firmware page state Newer versions of firmware support page states, which are used by the collaborative memory manager (future patch) to "loan" pages to the hypervisor for use by other partitions. Signed-off-by: Brian King Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit e46de429cb954d30a5642fba81d516ede518c65e Author: Robert Jennings Date: Thu Jul 24 04:29:03 2008 +1000 powerpc/pseries: Enable CMO feature during platform setup For Cooperative Memory Overcommitment (CMO), set the FW_FEATURE_CMO flag in powerpc_firmware_features from the rtas ibm,get-system-parameters table prior to calling iommu_init_early_pSeries. With this, any CMO specific functionality can be controlled by checking: firmware_has_feature(FW_FEATURE_CMO) Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 398778f78b76fb72cb18411487af01dea202709e Author: Robert Jennings Date: Thu Jul 24 04:28:05 2008 +1000 powerpc/pseries: Split retrieval of processor entitlement data into a helper routine Split the retrieval of processor entitlement data returned in the H_GET_PPP hcall into its own helper routine. Signed-off-by: Nathan Fontenot Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit dfc3403f0e5ffb94ee29942f313b87d4061d951b Author: Nathan Fontenot Date: Thu Jul 24 04:27:30 2008 +1000 powerpc/pseries: Add memory entitlement capabilities to /proc/ppc64/lparcfg Update /proc/ppc64/lparcfg to display Cooperative Memory Overcommitment statistics as reported by the H_GET_MPP hcall. This also updates the lparcfg interface to allow setting memory entitlement and weight. Signed-off-by: Nathan Fontenot Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 11529396ea3190113173f7a15e59a58dbcaa36c8 Author: Nathan Fotenot Date: Thu Jul 24 04:25:16 2008 +1000 powerpc/pseries: Split processor entitlement retrieval and gathering to helper routines Split the retrieval and setting of processor entitlement and weight into helper routines. This also removes the printing of the raw values returned from h_get_ppp, the values are already parsed and printed. Signed-off-by: Nathan Fontenot Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 545500b307658ad5783e0f3a52a32b97b2dfaed2 Author: Nathan Fontenot Date: Thu Jul 24 04:25:00 2008 +1000 powerpc/pseries: Remove extraneous error reporting for hcall failures in lparcfg Remove the extraneous error reporting used when a hcall made from lparcfg fails. Signed-off-by: Nathan Fontenot Signed-off-by: Robert Jennings Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt commit 80c60bf9b96f6108c630d90efc073cd520801e6c Author: Segher Boessenkool Date: Fri Jul 25 10:08:41 2008 +1000 powerpc: Fix compile error with binutils 2.15 My previous patch to fix compilation with binutils-2.17 causes a "file truncated" build error from ld with binutils 2.15 (and possibly older), and a warning with 2.16 and 2.17. This fixes it. Signed-off-by: Segher Boessenkool Acked-by: Chuck Meade Signed-off-by: Benjamin Herrenschmidt commit 7886250e9d71b24d0205ac6798ee855fb3836318 Author: Mark Nelson Date: Thu Jul 24 14:28:48 2008 +1000 powerpc/cell: Fixed IOMMU mapping uses weak ordering for a pcie endpoint At the moment the fixed mapping is by default strongly ordered (the iommu_fixed=weak boot option must be used to make the fixed mapping weakly ordered). If we're on a setup where the southbridge is being used in endpoint mode (triblade and CAB boards) the default should be a weakly ordered fixed mapping. This adds a check so that if a node of type pcie-endpoint can be found in the device tree the fixed mapping is set to be weak by default (but can be overridden using iommu_fixed=strong). Signed-off-by: Mark Nelson Acked-by: Arnd Bergmann Signed-off-by: Benjamin Herrenschmidt commit d6a61bfc06d6f2248f3e75f208d64e794082013c Author: Luis Machado Date: Thu Jul 24 02:10:41 2008 +1000 powerpc: BookE hardware watchpoint support This patch implements support for HW based watchpoint via the DBSR_DAC (Data Address Compare) facility of the BookE processors. It does so by interfacing with the existing DABR breakpoint code and adding the necessary bits and pieces for the new bits to be properly set or cleared Signed-off-by: Luis Machado Signed-off-by: Benjamin Herrenschmidt commit 00bf6e906156b07cd641fe154ad0efe78f989692 Author: Stephen Rothwell Date: Wed Jul 23 10:44:58 2008 +1000 powerpc: Fallout from sysdev API changes A struct sysdev_attribute * parameter was added to the show routine by commit 4a0b2b4dbe1335b8b9886ba3dc85a145d5d938ed "sysdev: Pass the attribute to the low level sysdev show/store function". This eliminates a warning: arch/powerpc/kernel/sysfs.c:538: warning: initialization from incompatible pointer type Signed-off-by: Stephen Rothwell Signed-off-by: Benjamin Herrenschmidt commit 9115d13453dee22473a1e8cacc90a8d64a9c4bc9 Author: Nathan Lynch Date: Wed Jul 16 09:58:51 2008 +1000 powerpc: Enable AT_BASE_PLATFORM aux vector Stash the first platform string matched by identify_cpu() in powerpc_base_platform, and supply that to the ELF loader for the value of AT_BASE_PLATFORM. Signed-off-by: Nathan Lynch Signed-off-by: Benjamin Herrenschmidt commit 483fad1c3fa1060d7e6710e84a065ad514571739 Author: Nathan Lynch Date: Tue Jul 22 04:48:46 2008 +1000 ELF loader support for auxvec base platform string Some IBM POWER-based platforms have the ability to run in a mode which mostly appears to the OS as a different processor from the actual hardware. For example, a Power6 system may appear to be a Power5+, which makes the AT_PLATFORM value "power5+". This means that programs are restricted to the ISA supported by Power5+; Power6-specific instructions are treated as illegal. However, some applications (virtual machines, optimized libraries) can benefit from knowledge of the underlying CPU model. A new aux vector entry, AT_BASE_PLATFORM, will denote the actual hardware. For example, on a Power6 system in Power5+ compatibility mode, AT_PLATFORM will be "power5+" and AT_BASE_PLATFORM will be "power6". The idea is that AT_PLATFORM indicates the instruction set supported, while AT_BASE_PLATFORM indicates the underlying microarchitecture. If the architecture has defined ELF_BASE_PLATFORM, copy that value to the user stack in the same manner as ELF_PLATFORM. Signed-off-by: Nathan Lynch Acked-by: Andrew Morton Signed-off-by: Benjamin Herrenschmidt commit e9f76354ce83a20c7768ad37caa033f6506b4f96 Merge: c174aff... ad1ede1... Author: Benjamin Herrenschmidt Date: Fri Jul 25 15:35:10 2008 +1000 Merge commit 'jk/jk-merge' commit c174aff95642bcc830102becb9802adeb8f87a5a Merge: fb2e405... 79c28ac... Author: Benjamin Herrenschmidt Date: Fri Jul 25 15:35:03 2008 +1000 Merge commit 'gcl/gcl-next' commit 6492cdf3a24fd620660c399745b5e169a0ed27d6 Author: Faisal Latif Date: Thu Jul 24 20:50:45 2008 -0700 RDMA/nes: CM connection setup/teardown rework Major rework of CM connection setup/teardown. We had a number of issues with MPI applications not starting/terminating properly over time. With these changes we were able to run longer on larger clusters. * Remove memory allocation from nes_connect() and nes_cm_connect(). * Fix mini_cm_dec_refcnt_listen() when destroying listener. * Remove unnecessary code from schedule_nes_timer() and nes_cm_timer_tick(). * Functionalize mini_cm_recv_pkt() and process_packet(). * Clean up cm_node->ref_count usage. * Reuse skbs if available. Signed-off-by: Faisal Latif Signed-off-by: Roland Dreier commit 9905922446f6dc02fd4650c8f59114d6bdb5b777 Author: Roland Dreier Date: Thu Jul 24 20:37:25 2008 -0700 IPoIB: Correct help text for INFINIBAND_IPOIB_DEBUG The help text for INFINIBAND_IPOIB_DEBUG refers to "ipoib_debugfs," which no longer exists. Correct this to talk about the files under debugfs that are really created. Signed-off-by: Roland Dreier commit 99c3a5a9e388e0ac166c617aaf02150e778d2779 Author: Roland Dreier Date: Thu Jul 24 20:37:25 2008 -0700 IPoIB/cm: Connected mode is no longer EXPERIMENTAL Connected mode is now tested and used by lots of people. No need to hide it under CONFIG_EXPERIMENTAL. Signed-off-by: Roland Dreier commit 5ba18b186c979283a2bf75a28b7ea325184b0c08 Author: Roland Dreier Date: Thu Jul 24 20:36:59 2008 -0700 RDMA/ucm: BKL is not needed for ib_ucm_open() Remove explicit cycle_kernel_lock() call and document why the code is safe. Signed-off-by: Roland Dreier commit f7a6117ee59c0001d58e830a82d7e205ed602bdd Author: Roland Dreier Date: Thu Jul 24 20:36:59 2008 -0700 RDMA/ucma: BKL is not needed for ucma_open() Remove explicit lock_kernel() calls and document why the code is safe. Signed-off-by: Roland Dreier commit 832fe9c222c7d431c2bff5765a0ac61bcb3df8c8 Merge: ed9559d... e34f872... Author: Linus Torvalds Date: Thu Jul 24 19:11:49 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: virtio: Add transport feature handling stub for virtio_ring. virtio: Rename set_features to finalize_features virtio: Formally reserve bits 28-31 to be 'transport' features. s390: use virtio_console for KVM on s390 virtio: console as a config option virtio_console: use virtqueue notification for hvc_console hvc_console: rework setup to replace irq functions with callbacks virtio_blk: check for hardsector size from host virtio: Use bus_type probe and remove methods virtio: don't always force a notification when ring is full virtio: clarify that ABI is usable by any implementations virtio: Recycle unused recv buffer pages for large skbs in net driver virtio net: Allow receiving SG packets virtio net: Add ethtool ops for SG/GSO virtio: fix virtio_net xmit of freed skb bug commit ed9559d38a87a44e3bda87d73a50aab92471d7dc Author: Rusty Russell Date: Fri Jul 25 12:11:09 2008 +1000 Label kthread_create() with printf attribute tag. Obvious misc patch been in my queue (& linux-next) for over a cycle. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds commit e34f87256794b87e7f4a8f1812538be7b7b5214c Author: Rusty Russell Date: Fri Jul 25 12:06:13 2008 -0500 virtio: Add transport feature handling stub for virtio_ring. To prepare for virtio_ring transport feature bits, hook in a call in all the users to manipulate them. This currently just clears all the bits, since it doesn't understand any features. Signed-off-by: Rusty Russell commit c624896e488ba2bff5ae497782cfb265c8b00646 Author: Rusty Russell Date: Fri Jul 25 12:06:07 2008 -0500 virtio: Rename set_features to finalize_features Rather than explicitly handing the features to the lower-level, we just hand the virtio_device and have it set the features. This make it clear that it has the chance to manipulate the features of the device at this point (and that all feature negotiation is already done). Signed-off-by: Rusty Russell commit dd7c7bc46211785a1aa7d70feb15830f62682b3c Author: Rusty Russell Date: Fri Jul 25 12:06:07 2008 -0500 virtio: Formally reserve bits 28-31 to be 'transport' features. We assign feature bits as required, but it makes sense to reserve some for the particular transport, rather than the particular device. Signed-off-by: Rusty Russell commit faeba830b086bc9e58748869054e994cb09693cd Author: Christian Borntraeger Date: Fri Jun 20 15:24:18 2008 +0200 s390: use virtio_console for KVM on s390 This patch enables virtio_console as the default console on kvm for s390. We currently use the same notify hack as lguest for early console output. I will try to address this for lguest and s390 later. Signed-off-by: Christian Borntraeger Signed-off-by: Rusty Russell commit 7721c494a28e06543a3d6aa412957aa783a4a531 Author: Christian Borntraeger Date: Fri Jul 25 12:06:06 2008 -0500 virtio: console as a config option I also added a small Kconfig change that allows the user to specify the virtio console in menuconfig. (Fixes to export symbols from Stephen Rothwell ) (Fixes for CONFIG_VIRTIO_CONSOLE=y vs CONFIG_VIRTIO=m from Christian himself) Signed-off-by: Rusty Russell Cc: Stephen Rothwell commit 91fcad19d03ed67cb50fd0e1913a8b89cc3ed3ec Author: Christian Borntraeger Date: Fri Jun 20 15:24:15 2008 +0200 virtio_console: use virtqueue notification for hvc_console This patch exploits the new notifier callbacks of the hvc_console. We can use the virtio callbacks instead of the polling code. Signed-off-by: Christian Borntraeger Signed-off-by: Rusty Russell commit 611e097d7707741a336a0677d9d69bec40f29f3d Author: Christian Borntraeger Date: Fri Jun 20 15:24:08 2008 +0200 hvc_console: rework setup to replace irq functions with callbacks This patch tries to change hvc_console to not use request_irq/free_irq if the backend does not use irqs. This allows virtio_console to use hvc_console without having a linker reference to request_irq/free_irq. In addition, together with patch 2/3 it improves the performance for virtio console input. (an earlier version of this patch was tested by Yajin on lguest) The irq specific code is moved to hvc_irq.c and selected by the drivers that use irqs (System p, System i, XEN). I replaced "int irq" with the opaque "int data". The request_irq and free_irq calls are replaced with notifier_add and notifier_del. I have also changed the code a bit to call the notifier_add and notifier_del inside the spinlock area as the callbacks are found via hp->ops. Changes since last version: o remove ifdef o reintroduce "irq_requested" as "notified" o cleanups, sparse.. I did not move the timer based polling into a separate polling scheme. I played with several variants, but it seems we need to sleep/schedule in a thread even for irq based consoles, as there are throttleing and buffer size constraints. I also kept hvc_struct defined in hvc_console.h so that hvc_irq.c can access the irq_requested element. Feedback is appreciated. virtio_console is currently the only available console for kvm on s390. I plan to push this change as soon as all affected parties agree on it. I would love to get test results from System p, Xen etc. Signed-off-by: Christian Borntraeger Signed-off-by: Rusty Russell commit 066f4d82a67f621ddd547bfa4b9c94631d8457b0 Author: Christian Borntraeger Date: Thu May 29 11:08:26 2008 +0200 virtio_blk: check for hardsector size from host Currently virtio_blk assumes a 512 byte hard sector size. This can cause trouble / performance issues if the backing has a different block size (like a file on an ext3 file system formatted with 4k block size or a dasd). Lets add a feature flag that tells the guest to use a different hard sector size than 512 byte. Signed-off-by: Christian Borntraeger Signed-off-by: Rusty Russell commit e962fa660d391fc9b90988e6538c94c858c099f9 Author: Mark McLoughlin Date: Fri Jun 13 13:46:40 2008 +0100 virtio: Use bus_type probe and remove methods Hook up to the probe() and remove() methods in bus_type rather than device_driver. The latter has been preferred since 2.6.16. Signed-off-by: Mark McLoughlin Signed-off-by: Rusty Russell commit 44653eae1407f79dff6f52fcf594ae84cb165ec4 Author: Rusty Russell Date: Fri Jul 25 12:06:04 2008 -0500 virtio: don't always force a notification when ring is full We force notification when the ring is full, even if the host has indicated it doesn't want to know. This seemed like a good idea at the time: if we fill the transmit ring, we should tell the host immediately. Unfortunately this logic also applies to the receiving ring, which is refilled constantly. We should introduce real notification thesholds to replace this logic. Meanwhile, removing the logic altogether breaks the heuristics which KVM uses, so we use a hack: only notify if there are outgoing parts of the new buffer. Here are the number of exits with lguest's crappy network implementation: Before: network xmit 7859051 recv 236420 After: network xmit 7858610 recv 118136 Signed-off-by: Rusty Russell commit 674bfc23c585b34c42263d73fb51710d49762a23 Author: Rusty Russell Date: Fri Jul 25 12:06:03 2008 -0500 virtio: clarify that ABI is usable by any implementations We want others to implement and use virtio, so it makes sense to BSD license the non-__KERNEL__ parts of the headers to make this crystal clear. Signed-off-by: Rusty Russell Acked-by: Christian Borntraeger Acked-by: Mark McLoughlin Acked-by: Ryan Harper Acked-by: Eric Van Hensbergen Acked-by: Anthony Liguori commit fb6813f480806d62361719e84777c8e00d3e86a8 Author: Rusty Russell Date: Fri Jul 25 12:06:01 2008 -0500 virtio: Recycle unused recv buffer pages for large skbs in net driver If we hack the virtio_net driver to always allocate full-sized (64k+) skbuffs, the driver slows down (lguest numbers): Time to receive 1GB (small buffers): 10.85 seconds Time to receive 1GB (64k+ buffers): 24.75 seconds Of course, large buffers use up more space in the ring, so we increase that from 128 to 2048: Time to receive 1GB (64k+ buffers, 2k ring): 16.61 seconds If we recycle pages rather than using alloc_page/free_page: Time to receive 1GB (64k+ buffers, 2k ring, recycle pages): 10.81 seconds This demonstrates that with efficient allocation, we don't need to have a separate "small buffer" queue. Signed-off-by: Rusty Russell commit 97402b96f87c6e32f75f1bffdd91a5ee144b679d Author: Herbert Xu Date: Fri Apr 18 11:24:27 2008 +0800 virtio net: Allow receiving SG packets Finally this patch lets virtio_net receive GSO packets in addition to sending them. This can definitely be optimised for the non-GSO case. For comparison the Xen approach stores one page in each skb and uses subsequent skb's pages to construct an SG skb instead of preallocating the maximum amount of pages per skb. Signed-off-by: Rusty Russell (added feature bits) commit a9ea3fc6f2654a7407864fec983d1671d775b5ee Author: Herbert Xu Date: Fri Apr 18 11:21:42 2008 +0800 virtio net: Add ethtool ops for SG/GSO This patch adds some basic ethtool operations to virtio_net so I could test SG without GSO (which was really useful because TSO turned out to be buggy :) Signed-off-by: Rusty Russell (remove MTU setting) commit 9953ca6cb757fb317bb7cdd2fcbf9b88312e241b Author: Mark McLoughlin Date: Tue May 27 12:06:26 2008 +0100 virtio: fix virtio_net xmit of freed skb bug On Mon, 2008-05-26 at 17:42 +1000, Rusty Russell wrote: > If we fail to transmit a packet, we assume the queue is full and put > the skb into last_xmit_skb. However, if more space frees up before we > xmit it, we loop, and the result can be transmitting the same skb twice. > > Fix is simple: set skb to NULL if we've used it in some way, and check > before sending. ... > diff -r 564237b31993 drivers/net/virtio_net.c > --- a/drivers/net/virtio_net.c Mon May 19 12:22:00 2008 +1000 > +++ b/drivers/net/virtio_net.c Mon May 19 12:24:58 2008 +1000 > @@ -287,21 +287,25 @@ again: > free_old_xmit_skbs(vi); > > /* If we has a buffer left over from last time, send it now. */ > - if (vi->last_xmit_skb) { > + if (unlikely(vi->last_xmit_skb)) { > if (xmit_skb(vi, vi->last_xmit_skb) != 0) { > /* Drop this skb: we only queue one. */ > vi->dev->stats.tx_dropped++; > kfree_skb(skb); > + skb = NULL; > goto stop_queue; > } > vi->last_xmit_skb = NULL; With this, may drop an skb and then later in the function discover that we could have sent it after all. Poor wee skb :) How about the incremental patch below? Cheers, Mark. Subject: [PATCH] virtio_net: Delay dropping tx skbs Currently we drop the skb in start_xmit() if we have a queued buffer and fail to transmit it. However, if we delay dropping it until we've stopped the queue and enabled the tx notification callback, then there is a chance space might become available for it. Signed-off-by: Mark McLoughlin Signed-off-by: Rusty Russell commit fb2e405fc1fc8b20d9c78eaa1c7fd5a297efde43 Author: Adrian Bunk Date: Fri Jul 25 02:55:49 2008 +0300 fix fs/nfs/nfsroot.c compilation This fixes the following compile error caused by commit f9247273cb69ba101877e946d2d83044409cc8c5 ("UFS: add const to parser token table"): CC fs/nfs/nfsroot.o /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/nfs/nfsroot.c:130: error: tokens causes a section type conflict make[3]: *** [fs/nfs/nfsroot.o] Error 1 Signed-off-by: Adrian Bunk Signed-off-by: Linus Torvalds commit 4b9f12a3779c548b68bc9af7d94030868ad3aa1b Author: Linus Torvalds Date: Thu Jul 24 17:29:00 2008 -0700 x86/oprofile/nmi_int: add Nehalem to list of ppro cores ..otherwise oprofile will fall back on that poor timer interrupt. Also replace the unreadable chain of if-statements with a "switch()" statement instead. It generates better code, and is a lot clearer. Signed-off-by: Linus Torvalds commit b30f3ae50cd03ef2ff433a5030fbf88dd8323528 Author: Linus Torvalds Date: Thu Jul 24 15:43:44 2008 -0700 x86-64: Clean up 'save/restore_i387()' usage Suresh Siddha wants to fix a possible FPU leakage in error conditions, but the fact that save/restore_i387() are inlines in a header file makes that harder to do than necessary. So start off with an obvious cleanup. This just moves the x86-64 version of save/restore_i387() out of the header file, and moves it to the only file that it is actually used in: arch/x86/kernel/signal_64.c. So exposing it in a header file was wrong to begin with. [ Side note: I'd like to fix up some of the games we play with the 32-bit version of these functions too, but that's a separate matter. The 32-bit versions are shared - under different names at that! - by both the native x86-32 code and the x86-64 32-bit compatibility code ] Acked-by: Suresh Siddha Signed-off-by: Linus Torvalds commit b5684b83b1e1579bbbc80e703e990c0cccf5892c Merge: 1481b91... 1b8ebad... Author: Linus Torvalds Date: Thu Jul 24 14:55:09 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (76 commits) ide: use proper printk() KERN_* levels in ide-probe.c ide: fix for EATA SCSI HBA in ATA emulating mode ide: remove stale comments from drivers/ide/Makefile ide: enable local IRQs in all handlers for TASKFILE_NO_DATA data phase ide-scsi: remove kmalloced struct request ht6560b: remove old history ht6560b: update email address ide-cd: fix oops when using growisofs gayle: release resources on ide_host_add() failure palm_bk3710: add UltraDMA/100 support ide: trivial sparse annotations ide: ide-tape.c sparse annotations and unaligned access removal ide: drop 'name' parameter from ->init_chipset method ide: prefix messages from IDE PCI host drivers by driver name it821x: remove DECLARE_ITE_DEV() macro it8213: remove DECLARE_ITE_DEV() macro ide: include PCI device name in messages from IDE PCI host drivers ide: remove for some archs ide-generic: remove ide_default_{io_base,irq}() inlines (take 3) ide-generic: is no longer needed on ppc32 ... commit 1481b9109fe771ec8b035d7760f42e36d2bed5d4 Merge: 5042d99... f88133d... Author: Linus Torvalds Date: Thu Jul 24 13:57:37 2008 -0700 Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6 * 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6: acpi: fix crash in core ACPI code, triggered by CONFIG_ACPI_PCI_SLOT=y ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM ACPI: thinkpad-acpi: bump up version to 0.21 ACPI: thinkpad-acpi: add bluetooth and WWAN rfkill support ACPI: thinkpad-acpi: WLSW overrides other rfkill switches ACPI: thinkpad-acpi: prepare for bluetooth and wwan rfkill support ACPI: thinkpad-acpi: consolidate wlsw notification function ACPI: thinkpad-acpi: minor refactor on radio switch init Revert "ACPI: don't walk tables if ACPI was disabled" Revert "dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled." Revert "Fix FADT parsing" ACPI : Set FAN device to correct state in boot phase ACPI: Ignore _BQC object when registering backlight device ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptors commit 5042d99795d3d817bef2f4cc46e953bee9bf7398 Merge: 5c40235... f17a077... Author: Linus Torvalds Date: Thu Jul 24 13:57:13 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: fixup sparse endianness warnings in proc.c PCI PM: make more PCI PM core functionality available to drivers PCI/DMAR: don't assume presence of RMRRs PCI hotplug: fix error path in pci_slot's register_slot commit 1b8ebad87b459e2e1333fbf28005977245ff5402 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:36 2008 +0200 ide: use proper printk() KERN_* levels in ide-probe.c While at it: - fixup printk() messages in save_match() and hwif_init(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 52f3a771feafe3e9c56f8d00c8eb53fd8f578f2d Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:36 2008 +0200 ide: fix for EATA SCSI HBA in ATA emulating mode IDE probing code used to skip devices attached to EATA SCSI HBA in ATA emulating mode but because of warm-plug support port I/O resources are no longer freed if no devices are detected on a port and the decision about the driver to use is left up to the user. Remove no longer valid EATA SCSI HBA quirk from do_identify(). Noticed-by: Alan Cox Signed-off-by: Bartlomiej Zolnierkiewicz commit d0b53f6866fa185da94968e62ae97923db18298c Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:36 2008 +0200 ide: remove stale comments from drivers/ide/Makefile Signed-off-by: Bartlomiej Zolnierkiewicz commit 90d2c6bc68745d67cdbf00bab43818d90aa0dfb6 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:36 2008 +0200 ide: enable local IRQs in all handlers for TASKFILE_NO_DATA data phase It is already done by task_no_data_intr() and there is no reason not to do it in other TASKFILE_NO_DATA data phase handlers. Signed-off-by: Bartlomiej Zolnierkiewicz commit e27420d046600cd3e4139ea1b6cba59a8b4050eb Author: FUJITA Tomonori Date: Thu Jul 24 22:53:35 2008 +0200 ide-scsi: remove kmalloced struct request This converts ide-scsi to use blk_get/put_request instead of kmalloc/kfree. Signed-off-by: FUJITA Tomonori Signed-off-by: Bartlomiej Zolnierkiewicz commit 216f9a88feabf5ed574c3aa78447a6bd872910bc Author: Jan Evert van Grootheest Date: Thu Jul 24 22:53:35 2008 +0200 ht6560b: remove old history Remove the ancient version history. Git does a better job. From: Jan Evert van Grootheest Signed-off-by: Bartlomiej Zolnierkiewicz commit eb34b2d90e71380ad19695188934230b06a3668b Author: Jan Evert van Grootheest Date: Thu Jul 24 22:53:35 2008 +0200 ht6560b: update email address Update email address. From: Jan Evert van Grootheest Signed-off-by: Bartlomiej Zolnierkiewicz commit e8e7b9eb11c34ee18bde8b7011af41938d1ad667 Author: Jens Axboe Date: Thu Jul 24 22:53:35 2008 +0200 ide-cd: fix oops when using growisofs cdrom_read_capacity() will blindly return the capacity from the device without sanity-checking it. This later causes code in fs/buffer.c to oops. Fix this by checking that the device is telling us sensible things. From: Jens Axboe Cc: Michael Buesch Cc: Jan Kara Cc: Arnd Bergmann Cc: Cc: Borislav Petkov Signed-off-by: Andrew Morton [bart: print device name instead of driver name] Signed-off-by: Bartlomiej Zolnierkiewicz [harvey: blocklen is a big-endian value] Signed-off-by: Harvey Harrison Signed-off-by: Bartlomiej Zolnierkiewicz commit 96cc112c09b3c6674da01ef8b377f7a916883ea2 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:34 2008 +0200 gayle: release resources on ide_host_add() failure "gayle: reserve memory resources at once" patch temporary removed freeing of resources on failure (to ease convertion to ide_host_add() interface). This patch fixes it. Thanks to Geert for noticing the issue. Noticed-by: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz commit a0f403bc58dcaa118f02ec70c3ecfec1bc26e445 Author: Sergei Shtylyov Date: Thu Jul 24 22:53:34 2008 +0200 palm_bk3710: add UltraDMA/100 support This controller supports UltraDMA up to mode 5 but it should be clocked with at least twice the data strobe frequency, so enable mode 5 for 100+ MHz IDECLK. While at it, start passing the correct device to clk_get() -- it worked anyway but WTF? :-/ Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 7fa897b91a3ea0f16c2873b869d7a0eef05acff4 Author: Harvey Harrison Date: Thu Jul 24 22:53:34 2008 +0200 ide: trivial sparse annotations Signed-off-by: Harvey Harrison Signed-off-by: Bartlomiej Zolnierkiewicz commit cd740ab0f69f6c94d9c7f916758e308f30a439fa Author: Harvey Harrison Date: Thu Jul 24 22:53:33 2008 +0200 ide: ide-tape.c sparse annotations and unaligned access removal If this is actually unaligned the access of speed/max_speed above is already broken and needs a get_unaligned. Otherwise it is aligned and they can be removed. Signed-off-by: Harvey Harrison Cc: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit a326b02b0c576001353dbc489154959b0889c6bf Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:33 2008 +0200 ide: drop 'name' parameter from ->init_chipset method There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit ced3ec8aa7d0fa3300187ee47c144a22ccfc974e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:32 2008 +0200 ide: prefix messages from IDE PCI host drivers by driver name Prefix messages from IDE PCI host drivers by driver name instead of marketed chipset name (it is still possible to exactly identify the particular chipset basing on driver messages). As a bonus this provides nice code savings for some drivers: text data bss dec hex filename 3826 112 8 3946 f6a drivers/ide/pci/amd74xx.o.before 2786 112 8 2906 b5a drivers/ide/pci/amd74xx.o.after 764 108 0 872 368 drivers/ide/pci/cs5520.o.before 680 108 0 788 314 drivers/ide/pci/cs5520.o.after 1680 112 4 1796 704 drivers/ide/pci/generic.o.before 1155 112 4 1271 4f7 drivers/ide/pci/generic.o.after 7128 792 0 7920 1ef0 drivers/ide/pci/hpt366.o.before 6984 792 0 7776 1e60 drivers/ide/pci/hpt366.o.after 2800 148 0 2948 b84 drivers/ide/pci/pdc202xx_new.o.before 2523 148 0 2671 a6f drivers/ide/pci/pdc202xx_new.o.after 2831 148 0 2979 ba3 drivers/ide/pci/pdc202xx_old.o.before 2683 148 0 2831 b0f drivers/ide/pci/pdc202xx_old.o.after 3776 112 4 3892 f34 drivers/ide/pci/piix.o.before 2804 112 4 2920 b68 drivers/ide/pci/piix.o.after 4693 116 0 4809 12c9 drivers/ide/pci/siimage.o.before 4600 116 0 4716 126c drivers/ide/pci/siimage.o.after Signed-off-by: Bartlomiej Zolnierkiewicz commit 04ba6e739e9c0623c25f94b191fd20dfbd1b26e3 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:32 2008 +0200 it821x: remove DECLARE_ITE_DEV() macro While at it: * it821x_chipsets[] -> it821x_chipset. * Fix it821x_chipset's name field (as it is used for IT8211/8212). Signed-off-by: Bartlomiej Zolnierkiewicz commit 29f1ca920cb8d65b979f7edf2fc7d11095461306 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:32 2008 +0200 it8213: remove DECLARE_ITE_DEV() macro While at it: * it8213_chipsets[] -> it8213_chipset. Signed-off-by: Bartlomiej Zolnierkiewicz commit 28cfd8af52a9ed4e5bd1751ea6bc0b8c870f68ec Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:31 2008 +0200 ide: include PCI device name in messages from IDE PCI host drivers While at it: * Apply small fixes to messages (s/dma/DMA/, remove trailing '.', etc). * Fix printk() call in ide_setup_pci_baseregs() to use KERN_INFO. * Move printk() call from ide_pci_clear_simplex() to the caller. * Cleanup do_ide_setup_pci_device() a bit. * amd74xx.c: remove superfluous PCI device revision information. * hpt366.c: fix two printk() calls in ->init_chipset to use KERN_INFO. * pdc202xx_new.c: fix printk() call in ->init_chipset to use KERN_INFO. * pdc202xx_old.c: fix driver message in pdc202xx_init_one(). * via82cxxx.c: fix driver warning message in via_init_one(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 2a8f7450f828eaee49d66f41f99ac2e54f1160a6 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:31 2008 +0200 ide: remove for some archs * Remove include from ( includes which is enough). * Remove for alpha/blackfin/h8300/ia64/m32r/sh/x86/xtensa (this leaves us with arm/frv/m68k/mips/mn10300/parisc/powerpc/sparc[64]). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit f01d35d87f39ab794ddcdefadb79c11054bcbfbc Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:31 2008 +0200 ide-generic: remove ide_default_{io_base,irq}() inlines (take 3) Replace ide_default_{io_base,irq}() inlines by legacy_{bases,irqs}[]. v2: Add missing zero-ing of hws[] (caught during testing by Borislav Petkov). v3: Fix zero-oing of hws[] for _real_ this time. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 35bbac9a2f73a7e0967d0a1d3e3673e2590ef716 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:30 2008 +0200 ide-generic: is no longer needed on ppc32 Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz commit ffed0b6e1a6f5132681d4b521531d992f893190b Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:30 2008 +0200 ide-generic: remove broken PPC_PREP support PPC_PREP has been depending on BROKEN for some time now. Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz commit d83b8b85cd56a083d30df73f3fd5e4714591b910 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:30 2008 +0200 ide: define MAX_HWIFS in * Now that ide_hwif_t instances are allocated dynamically the difference between MAX_HWIFS == 2 and MAX_HWIFS == 10 is ~100 bytes (x86-32) so use MAX_HWIFS == 10 on all archs except these ones that use MAX_HWIFS == 1. * Define MAX_HWIFS in instead of . [ Please note that avr32/cris/v850 have no and alpha/ia64/sh always define CONFIG_IDE_MAX_HWIFS. ] Signed-off-by: Bartlomiej Zolnierkiewicz commit 2c9d86438a0104800da2a8ecdc1e27baf38ba6a4 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:29 2008 +0200 ide: remove Remove and . This has been a broken code for some time now and needs rewrite to match IDE core code / host driver model anyway. Cc: Jesper Nilsson Cc: Mikael Starvik Signed-off-by: Bartlomiej Zolnierkiewicz commit b6cd7da5be2522b62bbc48d41b36c828b88e02fe Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:28 2008 +0200 ide-generic: remove "no_pci_devices()" quirk from ide_default_io_base() Since the decision to probe for ISA ide2-6 is now left to the user "no_pci_devices()" quirk is no longer needed and may be removed. Signed-off-by: Bartlomiej Zolnierkiewicz commit dbdec839c4c2bfc8f2da8e50c06b9947e5ad0394 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:28 2008 +0200 ide-generic: minor fix for mips Move ide_probe_legacy() call to ide_generic_init() so it fails early if necessary and returns the proper error value (nowadays ide_default_io_base() is used only by ide-generic). Cc: Ralf Baechle Signed-off-by: Bartlomiej Zolnierkiewicz commit ac32f3238c1d95a6ebea2c312160dbdbd61bf91c Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:27 2008 +0200 ide-generic: fix ide_default_io_base() for m32r Fix ide_default_io_base() to match ide_default_irq(). Cc: Hirokazu Takata Signed-off-by: Bartlomiej Zolnierkiewicz commit b0a62817961796f6dcef5f316134d8bc7279bf6e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:27 2008 +0200 ide: fix * Add missing include. While at it: * Remove needless ide_default_{irq,io_base}() inlines. Cc: Chris Zankel Signed-off-by: Bartlomiej Zolnierkiewicz commit 37c5ef56989717d871d048f98fb6411e7a17c43d Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:27 2008 +0200 rapide: add module_exit() Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz commit 8e27cb1135de4cc69bf358209f91e1f7ba81eca1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:27 2008 +0200 icside: add module_exit() Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz commit 585f67e736eece4cdf96b628042170273221e770 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:26 2008 +0200 via82cxxx: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit fc2c32b737fa370683f8c44d74f41febe33b9c23 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:26 2008 +0200 trm290: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 29d72f2df933ea5ecf294b170b2f02af2af88120 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:26 2008 +0200 triflex: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit ea881d6d6c58aa6d56105d1faba7432243ea7118 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:26 2008 +0200 tc86c001: add ->remove method and module_exit() Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 64b0fed31d6704e4e2e42e9a1ac5995b0a1b54e4 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 slc90e66: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 6ce7199897bcbad05ecd06a4df22795fb37f4d0a Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 sl82c105: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 1ceb906b4062954e92295191402e9214345ee0e9 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 sis5513: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit fe3825808ad67af02bd826a0d2ca6831e947e80e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 siimage: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit bc2c9a8025921972f0774859b8f19b324734e824 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 serverworks: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 991f5e69c512b284aaec81432dff0440b2a2f418 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:24 2008 +0200 sc1200: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 0fd188047ca75df85191cc55f929cb2889631430 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:24 2008 +0200 rz1000: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit da8c3e0d21c5dbb2815d7c8f1f09e0c68f626ed1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:24 2008 +0200 piix: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 574a1c24b63fdb584935b4924a38b451eeb0880e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:24 2008 +0200 pdc202xx_old: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit d69c8f8c0068b9fc7f5a5082d8a891618b732e2d Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:23 2008 +0200 pdc202xx_new: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit adc7f85ae68bd2e8db2e0136dcd4679891e5c321 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:23 2008 +0200 opti621: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit aa6e518d75742fd3ac3d2cb4c2bcbae850319fc1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:23 2008 +0200 ns87415: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 1bcaaba7749dce7c0506cff0e811c9bed8121f38 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:22 2008 +0200 jmicron: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 87d8b61356108835f5e91c0fb32b830ec585978c Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:22 2008 +0200 it821x: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 5102f768570b3486979afb68c595b71cfb7f026f Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:22 2008 +0200 it8213: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit a6c43a2be9721d00ef9d6ef5b7b0e8113444577b Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:21 2008 +0200 hpt366: add ->remove method and module_exit() Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 741ac62f6fca55ddbef52513fbc687ba6b04f99e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:21 2008 +0200 hpt34x: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit f566bcae9fb39b108e39a2f31594c028d6ee2e77 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:21 2008 +0200 ide/pci/generic: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit cd68841b854e24076d41c32eae3ccfce6ae60a59 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:21 2008 +0200 cy82c693: add ->remove method and module_exit() Fix the refcounting for dev2 while at it. Signed-off-by: Bartlomiej Zolnierkiewicz commit 40c8a7f67d38de87f97a548b81b6cd0621a3ff9a Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:20 2008 +0200 cs5535: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit d16492a9789982955e627a7ffdcd1c3b945f7e85 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:20 2008 +0200 cs5530: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit e2b15b4765ca032d0837dfc8c195ecd3bc56a433 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:20 2008 +0200 cmd64x: add ->remove method and module_exit() Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit f354fbc4b45a730aa0f876322ea4f096b47d1013 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:20 2008 +0200 atiixp: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit b2509ac1d9dbe7a9d3a9915afbe108978002c95b Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:19 2008 +0200 amd74xx: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 8ee3f3b69d9c37f86a45862f53451699ec77fe12 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:19 2008 +0200 alim15x3: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit eb7cb98b1cc8be1d4395d9accf49ae3924cd68f1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:19 2008 +0200 aec62xx: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit ef0b04276d8f719d754c092434fbd62c2aeb5307 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:19 2008 +0200 ide: add ide_pci_remove() helper * Add 'unsigned long host_flags' field to struct ide_host. * Set ->host_flags in ide_host_alloc_all(). * Always set PCI dev's ->driver_data in ide_pci_init_{one,two}(). * Add ide_pci_remove() helper (the default implementation for struct pci_driver's ->remove method). Signed-off-by: Bartlomiej Zolnierkiewicz commit 37525bebcfc15a1fe5a9cb50bf49b21bf43559c1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:18 2008 +0200 via82cxxx: cleanup ->init_chipset method * Move the boot message and via_clock setup from init_chipset_via82cxxx() to via_init_one(). * Set vdev->via_config in via_init_one() and cleanup init_chipset_via82cxxx() accordingly. Signed-off-by: Bartlomiej Zolnierkiewicz commit 0794230fd4b1bf61af8aabd7e987a595d6dbc430 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:17 2008 +0200 cmd64x: cleanup ->init_chipset method Remove verbose reporting for CMD646 (PCI device revision is always logged by IDE PCI layer). Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit d51f19c86583ca70468883d8137a92689f1a80c1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:17 2008 +0200 amd74xx: cleanup ->init_chipset method Move amd_clock setup from init_chipset_amd74xx() to amd74xx_probe(). Signed-off-by: Bartlomiej Zolnierkiewicz commit b16040b14e766d390138b04c8829c816f4c1d95b Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:17 2008 +0200 tc86c001: remove ->init_chipset method * Reserve PCI BAR 5 in tc86c001_init_one() and remove no longer needed init_chipset_tc86c001(). While at it: * Add & use DRV_NAME define. Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ee77325b074a73694b66ec9eca4f7e55dad58b84 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:17 2008 +0200 via82cxxx: convert to use ->host_priv Signed-off-by: Bartlomiej Zolnierkiewicz commit 4c674235d667d7ddc6b0c95a228a507eb94da2d6 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:16 2008 +0200 siimage: convert to use ->host_priv While at it: * Reserve PCI BAR 5 in siimage_init_one() and remove no longer needed setup_mmio_siimage(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 96776f3b57eb7beb889a4368937cc9d74082a47e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:16 2008 +0200 sc1200: convert to use ->host_priv Signed-off-by: Bartlomiej Zolnierkiewicz commit 1d76d9dc448d5a6fc7b49ba06c634aa6927bcc3d Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:16 2008 +0200 it821x: convert to use ->host_priv While at it: * Allocate both struct it821x_dev instances at once. * Don't leak itdevs on ide_pci_init_one() failure. Signed-off-by: Bartlomiej Zolnierkiewicz commit 74811f355f4f69a187fa74892dcf2a684b84ce99 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:15 2008 +0200 hpt366: convert to use ->host_priv While at it: * Allocate both struct hpt_info instances at once. Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 60e57ed7c12917932a01d1679d92a7a8735afbce Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:15 2008 +0200 aec62xx: convert to use ->host_priv Signed-off-by: Bartlomiej Zolnierkiewicz commit 08da591e14cf87247ec09b17c350235157a92fc3 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:15 2008 +0200 ide: add ide_device_{get,put}() helpers * Add 'struct ide_host *host' field to ide_hwif_t and set it in ide_host_alloc_all(). * Add ide_device_{get,put}() helpers loosely based on SCSI's scsi_device_{get,put}() ones. * Convert IDE device drivers to use ide_device_{get,put}(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 6cdf6eb357c2681596b7b1672b92396ba82333d4 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:14 2008 +0200 ide: add ->dev and ->host_priv fields to struct ide_host * Add 'struct device *dev[2]' and 'void *host_priv' fields to struct ide_host. * Set ->dev[] in ide_host_alloc_all()/ide_setup_pci_device[s](). * Pass 'void *priv' argument to ide_setup_pci_device[s]() and use it to set ->host_priv. * Set PCI dev's ->driver_data to point to the struct ide_host instance if PCI host driver wants to use ->host_priv. * Rename ide_setup_pci_device[s]() to ide_pci_init_{one,two}(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 8c2eece50a368c7986bae0b3e52739558dd71b51 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:12 2008 +0200 ide: call ide_pci_setup_ports() before do_ide_setup_pci_device() * Call ide_pci_setup_ports() before do_ide_setup_pci_device() in ide_setup_pci_device[s](). While at it: * Remove stale FIXMEs. Signed-off-by: Bartlomiej Zolnierkiewicz commit a742d6cf0b37b1a96a1549b1fda0d6b19e0185c2 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:12 2008 +0200 ide: move ide_setup_pci_controller() call to ide_setup_pci_device[s]() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit a95925a309cd9a2e7f5a5713fd70e0dadb09890c Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:11 2008 +0200 ide: respect dev->irq in do_ide_setup_pci_device() also if 'tried_config' * If device is in the PCI native mode respect dev->irq regardless of 'tried_config' in do_ide_setup_pci_device(). * Drop no longer needed 'config' argument from ide_setup_pci_controller(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 708e5f9eb68589b87724af3f0fb4e681dfdfd69f Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:11 2008 +0200 ide: always call ->init_chipset method in do_ide_setup_pci_device() Call ->init_chipset method also for 'tried_config' / '!pciirq' conditions. Signed-off-by: Bartlomiej Zolnierkiewicz commit e2d2867ff8700d7431c68c089ff5f5ed7f2d5b40 Author: Chris Wright Date: Thu Jul 24 20:43:34 2008 +0000 When verifying the decoded header before decoding the object identifier (expecting a SPNEGO pseudo-mechanism oid), the test to verify it is a primitive encoding is compared against the asn1 class. Primitive is not a class. This brings check in line with similar check for krb/ntlmssp oid. Signed-off-by: Chris Wright Cc: Steven French Signed-off-by: Andrew Morton Signed-off-by: Steve French commit 5c402355adf8f920531f02099f4ec0d2bccd4c64 Merge: ecc8b65... 2cc1773... Author: Linus Torvalds Date: Thu Jul 24 12:56:07 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: MAINTAINERS: Remove Glenn Streiff from NetEffect entry mlx4_core: Improve error message when not enough UAR pages are available IB/mlx4: Add support for memory management extensions and local DMA L_Key IB/mthca: Keep free count for MTT buddy allocator mlx4_core: Keep free count for MTT buddy allocator mlx4_code: Add missing FW status return code IB/mlx4: Rename struct mlx4_lso_seg to mlx4_wqe_lso_seg mlx4_core: Add module parameter to enable QoS support RDMA/iwcm: Remove IB_ACCESS_LOCAL_WRITE from remote QP attributes IPoIB: Include err code in trace message for ib_sa_path_rec_get() failures IB/sa_query: Check if sm_ah is NULL in ib_sa_remove_one() IB/ehca: Release mutex in error path of alloc_small_queue_page() IB/ehca: Use default value for Local CA ACK Delay if FW returns 0 IB/ehca: Filter PATH_MIG events if QP was never armed IB/iser: Add support for RDMA_CM_EVENT_ADDR_CHANGE event RDMA/cma: Add RDMA_CM_EVENT_TIMEWAIT_EXIT event RDMA/cma: Add RDMA_CM_EVENT_ADDR_CHANGE event commit ecc8b655b38a880b578146895e0e1e2d477ca2c0 Merge: 2528ce3... e338125... Author: Linus Torvalds Date: Thu Jul 24 12:55:01 2008 -0700 Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: nohz: adjust tick_nohz_stop_sched_tick() call of s390 as well nohz: prevent tick stop outside of the idle loop commit 2528ce3237be4e900f5eaa455490146e1422e424 Merge: 8ffa5b6... 36bd53d... Author: Linus Torvalds Date: Thu Jul 24 12:54:26 2008 -0700 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: arch/mips/kernel/stacktrace.c: Heiko can't type kthread: reduce stack pressure in create_kthread and kthreadd fix core/stacktrace changes on avr32, mips, sh commit 8ffa5b65968262ba6bb046329972791c0d960745 Merge: 6209ed9... 58838cf... Author: Linus Torvalds Date: Thu Jul 24 12:53:51 2008 -0700 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: clean up compiler warning sched: fix hrtick & generic-ipi dependency commit 6209ed9d8443b63c36d340908530fa470c4d4fff Author: Linus Torvalds Date: Thu Jul 24 12:49:26 2008 -0700 x86-64: make BUILD_IRQ() also reset section back Commit 9d25d4db81833029d30b7b03cc1000cbbe09e192 ("x86: BUILD_IRQ say .text to avoid .data.percpu") added a ".text" specifier to make sure that BUILD_IRQ() builds the irq trampoline in the text segment rather than in some random left-over segment that the compiler happened to leave the asm in. However, we should also make sure that we switch back by adding a ".previous" at the end, so that there are no subtle issues with subsequent compiler-generated code. Signed-off-by: Linus Torvalds commit 6044110742bc2ae0577b962985e7c63e0634b2e9 Merge: 7540081... 04bbe43... Author: Linus Torvalds Date: Thu Jul 24 12:33:51 2008 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: fix header export, asm-x86/processor-flags.h, CONFIG_* leaks x86: BUILD_IRQ say .text to avoid .data.percpu xen: don't use sysret for sysexit32 x86: call early_cpu_init at the same point commit 7540081c6b16dc941895bca840749cabfd0d3b48 Merge: 3fde80e... b552068... Author: Linus Torvalds Date: Thu Jul 24 12:24:40 2008 -0700 Merge branch 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc * 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc: Remove __DECLARE_SEMAPHORE_GENERIC Remove asm/semaphore.h Remove use of asm/semaphore.h Add missing semaphore.h includes Remove mention of semaphores from kernel-locking commit 3fde80e94c2bbffbb13f5faa3340cf438440ebea Merge: ac9f80a... 9b0e741... Author: Linus Torvalds Date: Thu Jul 24 12:17:19 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: put ColdFire head code into .text.head section m68knommu: remove last use of CONFIG_FADS and CONFIG_RPXCLASSIC m68knommu: remove RPXCLASSIC from the m68k tree m68knommu: fec: remove FADS m68knommu: MCF5307 PIT GENERIC_CLOCKEVENTS support m68knommu: add read_barrier_depends() and irqs_disabled_flags() m68knommu: add byteswap assembly opcode for ISA A+ m68knommu: add ffs and __ffs plattform which support ISA A+ or ISA C m68knommu: add sched_clock() for the DMA timer m68knommu: complete generic time m68knommu: move code within time.c m68knommu: m68knommu: add old stack trace method m68knommu: Add Coldfire DMA Timer support m68knommu: defconfig for M5407C3 board m68knommu: defconfig for M5307C3 board m68knommu: defconfig for M5275EVB board m68knommu: defconfig for M5249EVB board m68knommu: change to a configs directory for board configurations commit ac9f80ad16e6e934b6c1f12f82d27889c0f9abcc Merge: c54554d... f6ec2d9... Author: Linus Torvalds Date: Thu Jul 24 12:16:40 2008 -0700 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight * 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: backlight: Fix missing kernel doc entry backlight: Add Nvidia-based Apple Macbook Pro backlight driver commit c54554d388369f7f88ddcbe285ca96f7fb8a2d4b Merge: 4378dcc... fe3025b... Author: Linus Torvalds Date: Thu Jul 24 12:16:02 2008 -0700 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds * 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds: leds: Ensure led->trigger is set earlier leds: Add support for Philips PCA955x I2C LED drivers leds: Fix sparse warnings in leds-h1940 driver leds: mark led_classdev.default_trigger as const leds: fix unsigned value overflow in atmel pwm driver leds: Add pca9532 platform data for Thecus N2100 leds: Add pca9532 led driver commit 4378dcca8578b0fd0fba883a3354ad4820d4f85f Merge: c3c2233... 7ae93f5... Author: Linus Torvalds Date: Thu Jul 24 12:15:16 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: Fix cpufreq notifier registry. sparc64: Fix lockdep issues in LDC protocol layer. commit c3c2233d84bee397b8271923c007264eb3efa67b Merge: f924727... f867e6a... Author: Linus Torvalds Date: Thu Jul 24 12:14:58 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: pkt_sched: sch_sfq: dump a real number of flows atm: [fore200e] use MODULE_FIRMWARE() and other suggested cleanups netfilter: make security table depend on NETFILTER_ADVANCED tcp: Clear probes_out more aggressively in tcp_ack(). e1000e: fix e1000_netpoll(), remove extraneous e1000_clean_tx_irq() call net: Update entry in af_family_clock_key_strings netdev: Remove warning from __netif_schedule(). sky2: don't stop queue on shutdown commit f9247273cb69ba101877e946d2d83044409cc8c5 Author: Steven Whitehouse Date: Thu Jul 24 17:22:13 2008 +0100 UFS: add const to parser token table This patch adds a "const" to the parser token table. I've done an allmodconfig build to see if this produces any warnings/failures and the patch includes a fix for the only warning that was produced. Signed-off-by: Steven Whitehouse Acked-by: Alexander Viro Acked-by: Evgeniy Dushistov Signed-off-by: Linus Torvalds commit b340e8a57ef381e69c99a7a8ede61a6bf71a8014 Author: Akinobu Mita Date: Wed Jul 23 21:31:51 2008 -0700 auxdisplay: small cleanups - Use BUILD_BUG_ON for CFAG12864B_SIZE instead of runtime-check - Use get_zeroed_page() Signed-off-by: Akinobu Mita Cc: Miguel Ojeda Sandonis Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5bb49fcd501aa9fd3d321a22b7c01d9b0db7ab36 Author: Philippe De Muyter Date: Wed Jul 23 21:31:50 2008 -0700 video/fb: cleanup FB_MAJOR usage Currently, linux/major.h defines a GRAPHDEV_MAJOR (29) that nobody uses, and linux/fb.h defines the real FB_MAJOR (also 29), that only fbmem.c needs. Drop GRAPHDEV_MAJOR from major.h, move FB_MAJOR definition from fb.h to major.h, and fix fbmem.c to use major.h's definition. Signed-off-by: Philippe De Muyter Cc: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cba603bf514c101bf48f6adf393c3d00ed457a57 Author: Jan Beulich Date: Wed Jul 23 21:31:49 2008 -0700 fbcon: remove stray semicolons [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jan Beulich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3e074058d72486676f6fdf6fe803200c62dcb403 Author: Hans-Christian Egtvedt Date: Wed Jul 23 21:31:48 2008 -0700 fbdev: LCD backlight driver using Atmel PWM driver This patch adds a platform driver using the ATMEL PWM driver to control a backlight which requires a PWM signal and optional GPIO signal for discrete on/off signal. It has been tested on Favr-32 board from EarthLCD. The driver is configurable by supplying a struct with the platform data. See the include/linux/atmel-pwm-bl.h for details. The board code for Favr-32 will be submitted to the AVR32 kernel list. Signed-off-by: Hans-Christian Egtvedt Cc: Krzysztof Helt Cc: Haavard Skinnemoen Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d04a4a72d7e1519b4838f24bdd4b5d0f3f426dc Author: Stefano Stabellini Date: Wed Jul 23 21:31:48 2008 -0700 fbcon: bgcolor fix The fourth bit of the background color is the blink property bit, not the intensity bit, as for the foreground color. Therefore it shouldn't be included in the background color. Signed-off-by: Stefano Stabellini Cc: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a25e41831ee851c1365d8b41decc22493b18e6d Author: Nobuhiro Iwamatsu Date: Wed Jul 23 21:31:46 2008 -0700 video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver Framebuffer driver for the SH7760/SH7763 integrated LCD controller. Signed-off-by: Manuel Lauss Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Paul Mundt Cc: Krzysztof Helt Cc: "Antonino A. Daplas" Cc: Siegfried Schaefer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c6b044d6bab5e2878d408666469362fc200a889a Author: Krzysztof Helt Date: Wed Jul 23 21:31:45 2008 -0700 neofb: drop the xtimings structure Remove the xtimings structure which only stored some values to be used later (mostly once). Calculate and use these values in places they are needed. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1ca6b62f8ca668ccfab0da9112c0125ef82343bd Author: Krzysztof Helt Date: Wed Jul 23 21:31:45 2008 -0700 neofb: drop redundant code Drop structure which is only set but never read. Drop variables which are only set and never read. Convert one long switch into two shorter ones. Add cpu_relax() in busy waiting loop. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7fc80b7bd682b47825e806018cca8ff7dc6bb55a Author: Krzysztof Helt Date: Wed Jul 23 21:31:44 2008 -0700 neofb: simplify clock calculation There is nothing to gain by converting value in kHz to fixed point MHz. Just calculate everything in kHz. A reorder of the loop allows reducing number of iterations (check if frequency is not too high already). Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5798712d608f5ebad994487748a2ccf3cc613d78 Author: Adrian Bunk Date: Wed Jul 23 21:31:43 2008 -0700 drivers/video/amifb.c cleanups This patch contains the following cleanups: - make the needlessly global amifb_init() static - rename cleanup_module() to amifb_exit(), make it static __exit, use module_exit(), there's no need to #ifdef MODULE it Signed-off-by: Adrian Bunk Acked-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 104b198dd0b3b62a4fc4e9146f01f2abc718e926 Author: Jordan Crouse Date: Wed Jul 23 21:31:43 2008 -0700 lxfb: fix console blanking Simply enabling DAC blanking without turning off the CRT seems to be resulting in characters remaining on the screen when the monitor blanks. This patch turns off the CRT for all modes, and also powers down the DACs when vsync and/or hsync are disabled. Signed-off-by: Jordan Crouse Acked-by: Andres Salomon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be935d5b6301865b4e9ec35d79d398cedb3c82b7 Author: Andres Salomon Date: Wed Jul 23 21:31:41 2008 -0700 lxfb: drop dead declarations from header We never sent the gamma stuff upstream, and don't really care about it. However, lx_[gs]_et_gamma prototypes snuck into lxfb.h anyways; there are no definitions for them. Drop the dead code. Signed-off-by: Andres Salomon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 18b095d4b847bb08bf8a1bace7711a93d27732c0 Author: Yoichi Yuasa Date: Wed Jul 23 21:31:41 2008 -0700 drivers/char: remove old broken Cobalt LCD driver Remove old broken Cobalt LCD driver. Signed-off-by: Yoichi Yuasa Acked-by: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5abe3b4063f16245b8fafbff37bd93814eb8e363 Author: Yoichi Yuasa Date: Wed Jul 23 21:31:40 2008 -0700 fbdev: add new Cobalt LCD framebuffer driver Add new Cobalt LCD framebuffer driver. [akpm@linux-foundation.org: fix build] Signed-off-by: Yoichi Yuasa Cc: Krzysztof Helt Cc: "Antonino A. Daplas" Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b51d51a9d24719f905ba9657b29e04efd82a7ea Author: Timur Tabi Date: Wed Jul 23 21:31:39 2008 -0700 fsl-diu-fb: update Freescale DIU driver to use page_alloc_exact() Update the Freescale DIU driver to use page_alloc_exact() to allocate a DMA buffer. This also eliminates the rheap-based memory allocator. We can do this now because commit 6ccf61f9 allows us to allocate 8MB physically- contiguous memory blocks. [akpm@linux-foundation.org: fix printk warnings] Signed-off-by: Timur Tabi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c25826a7cf1c61b5c6e6db8365172eb97ef39ef3 Author: Ben Dooks Date: Wed Jul 23 21:31:38 2008 -0700 lcd: add platform_lcd driver Add a platform_lcd driver to allow boards with simple lcd power controls to register themselves easily. [akpm@linux-foundation.org: build fix] Signed-off-by: Ben Dooks Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c531360ed504aa0ce995fcb8ef08e82b6534d0b Author: Ben Dooks Date: Wed Jul 23 21:31:38 2008 -0700 lcd: add lcd_device to check_fb() entry in lcd_ops Add the lcd_device being checked to the check_fb entry of lcd_ops. This ensures that any driver using this to check against it's own state can do so, and also makes all the calls in lcd_ops more orthogonal in their arguments. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cccb6d3c149603b9c15d3c460dff317455df1766 Author: Ben Dooks Date: Wed Jul 23 21:31:37 2008 -0700 fb: add support for the ILI9320 video display controller Provide support for the ILI9320 display controller chip which is found in many LCD displays. Included with this is support for an example LCD using this chip, the VGG2432A4. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d05254190dd1a4751284f4a51efb70fcc16c45a4 Author: Ben Dooks Date: Wed Jul 23 21:31:37 2008 -0700 sm501: fixup allocation code to be 64bit resource compliant As pointed out by Andrew Morton, we have a problem when setting the 64bit resources option. Alter the allocation routines to remove the need to use the start and end fields, use the proper HEAD_PANEL/HEAD_CRT and update the comments. Note, we also fix the bug where we failed to check the size of the CRT memory allocation. [akpm@linux-foundation.org: cleanup] Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b599fb2fc23386dfd2965bf7d10b2b0f628b208 Author: Ben Dooks Date: Wed Jul 23 21:31:36 2008 -0700 sm501: restructure init to allow only 1 fb on an SM501 Add the ability to register only one of the two possible main framebuffer devices on the SM501 by passing platform data for only the framebuffer that you are interested in having. As a side note, we update the init sequence to commonise the code that is executed twice, and fix a pair of missing frees that we didn't do on framebuffer exit, such as freeing the fb's cmap. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 206c5d69d0540024faffd423fc703f1e457332d7 Author: Ben Dooks Date: Wed Jul 23 21:31:35 2008 -0700 sm501: add inversion controls for VBIASEN and FPEN Add flags to allow the driver to invert the sense of both VBIASEN and FPEN signals comming from the SM501. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 968910bd03b226ed410d092c2da59dffe5bfe8de Author: Nicolas Ferre Date: Wed Jul 23 21:31:34 2008 -0700 atmel_lcdfb: avoid division by zero Avoid division by zero in atmel_lcdfb_check_var() function. If pixclock is not specified while passing a var structure in the check_var() funtion, a division by zero occurs (when translating pixclock to KHz). This patch adds a checking of this value and try to choose a video mode in the modelist. The mode found in the probe function in added to the modelist. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Nicolas Ferre Cc: Haavard Skinnemoen Cc: Andrew Victor Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84c41ce83e9b2987ccef352f28ba0055b26c8f8e Author: Krzysztof Helt Date: Wed Jul 23 21:31:34 2008 -0700 skeletonf