]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/log
mirror_ubuntu-disco-kernel.git
15 years agoext4: remove /proc tuning knobs
Theodore Ts'o [Tue, 31 Mar 2009 13:11:14 +0000 (09:11 -0400)]
ext4: remove /proc tuning knobs

Remove tuning knobs in /proc/fs/ext4/<dev/* since they have been
replaced by knobs in sysfs at /sys/fs/ext4/<dev>/*.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Add sysfs support
Theodore Ts'o [Tue, 31 Mar 2009 13:10:09 +0000 (09:10 -0400)]
ext4: Add sysfs support

Add basic sysfs support so that information about the mounted
filesystem and various tuning parameters can be accessed via
/sys/fs/ext4/<dev>/*.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Track lifetime disk writes
Theodore Ts'o [Sun, 1 Mar 2009 00:39:58 +0000 (19:39 -0500)]
ext4: Track lifetime disk writes

Add a new superblock value which tracks the lifetime amount of writes
to the filesystem.  This is useful in estimating the amount of wear on
solid state drives (SSD's) caused by writes to the filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Fix discard of inode prealloc space with delayed allocation.
Aneesh Kumar K.V [Sat, 28 Mar 2009 02:36:43 +0000 (22:36 -0400)]
ext4: Fix discard of inode prealloc space with delayed allocation.

With delayed allocation we should not/cannot discard inode prealloc
space during file close. We would still have dirty pages for which we
haven't allocated blocks yet. With this fix after each get_blocks
request we check whether we have zero reserved blocks and if yes and
we don't have any writers on the file we discard inode prealloc space.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Automatically allocate delay allocated blocks on rename
Theodore Ts'o [Tue, 24 Feb 2009 04:05:27 +0000 (23:05 -0500)]
ext4: Automatically allocate delay allocated blocks on rename

When renaming a file such that a link to another inode is overwritten,
force any delay allocated blocks that to be allocated so that if the
filesystem is mounted with data=ordered, the data blocks will be
pushed out to disk along with the journal commit.  Many application
programs expect this, so we do this to avoid zero length files if the
system crashes unexpectedly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Automatically allocate delay allocated blocks on close
Theodore Ts'o [Tue, 24 Feb 2009 13:21:14 +0000 (08:21 -0500)]
ext4: Automatically allocate delay allocated blocks on close

When closing a file that had been previously truncated, force any
delay allocated blocks that to be allocated so that if the filesystem
is mounted with data=ordered, the data blocks will be pushed out to
disk along with the journal commit.  Many application programs expect
this, so we do this to avoid zero length files if the system crashes
unexpectedly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: add EXT4_IOC_ALLOC_DA_BLKS ioctl
Theodore Ts'o [Thu, 26 Feb 2009 06:04:07 +0000 (01:04 -0500)]
ext4: add EXT4_IOC_ALLOC_DA_BLKS ioctl

Add an ioctl which forces all of the delay allocated blocks to be
allocated.  This also provides a function ext4_alloc_da_blocks() which
will be used by the following commits to force files to be fully
allocated to preserve application-expected ext3 behaviour.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Simplify delalloc code by removing mpage_da_writepages()
Theodore Ts'o [Mon, 23 Feb 2009 21:42:39 +0000 (16:42 -0500)]
ext4: Simplify delalloc code by removing mpage_da_writepages()

The mpage_da_writepages() function is only used in one place, so
inline it to simplify the call stack and make the code easier to
understand.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Save stack space by removing fake buffer heads
Theodore Ts'o [Mon, 23 Feb 2009 11:46:01 +0000 (06:46 -0500)]
ext4: Save stack space by removing fake buffer heads

Struct mpage_da_data and mpage_add_bh_to_extent() use a fake struct
buffer_head which is 104 bytes on an x86_64 system, but only use 24
bytes of the structure.  On systems that use a spinlock for atomic_t,
the stack savings will be even greater.

It turns out that using a fake struct buffer_head doesn't even save
that much code, and it makes the code more confusing since it's not
used as a "real" buffer head.  So just store pass b_size and b_state
in mpage_add_bh_to_extent(), and store b_size, b_state, and b_block_nr
in the mpage_da_data structure.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Simplify delalloc implementation by removing mpd.get_block
Theodore Ts'o [Mon, 23 Feb 2009 15:48:07 +0000 (10:48 -0500)]
ext4: Simplify delalloc implementation by removing mpd.get_block

This parameter was always set to ext4_da_get_block_write().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Add fine print for the 32000 subdirectory limit
Theodore Ts'o [Mon, 23 Feb 2009 05:51:57 +0000 (00:51 -0500)]
ext4: Add fine print for the 32000 subdirectory limit

Some poeple are reading the ext4 feature list too literally and create
dubious test cases involving very long filenames and 1k blocksize and
then complain when they run into an htree-imposed limit.  So add fine
print to the "fix 32000 subdirectory limit" ext4 feature.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Validate extent details only when read from the disk
Aneesh Kumar K.V [Fri, 27 Mar 2009 20:39:58 +0000 (16:39 -0400)]
ext4: Validate extent details only when read from the disk

Make sure we validate extent details only when read from the disk.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Thiemo Nagel <thiemo.nagel@ph.tum.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Add checks to validate extent entries.
Aneesh Kumar K.V [Thu, 12 Mar 2009 13:51:20 +0000 (09:51 -0400)]
ext4: Add checks to validate extent entries.

This patch adds checks to validate the extent entries along with extent
headers, to avoid crashes caused by corrupt filesystems.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: return -EIO not -ESTALE on directory traversal through deleted inode
Bryan Donlan [Mon, 23 Feb 2009 02:20:25 +0000 (21:20 -0500)]
ext4: return -EIO not -ESTALE on directory traversal through deleted inode

ext4_iget() returns -ESTALE if invoked on a deleted inode, in order to
report errors to NFS properly.  However, in ext4_lookup(), this
-ESTALE can be propagated to userspace if the filesystem is corrupted
such that a directory entry references a deleted inode.  This leads to
a misleading error message - "Stale NFS file handle" - and confusion
on the part of the admin.

The bug can be easily reproduced by creating a new filesystem, making
a link to an unused inode using debugfs, then mounting and attempting
to ls -l said link.

This patch thus changes ext4_lookup to return -EIO if it receives
-ESTALE from ext4_iget(), as ext4 does for other filesystem metadata
corruption; and also invokes the appropriate ext*_error functions when
this case is detected.

Signed-off-by: Bryan Donlan <bdonlan@gmail.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: New inode/block allocation algorithms for flex_bg filesystems
Theodore Ts'o [Thu, 12 Mar 2009 16:18:34 +0000 (12:18 -0400)]
ext4: New inode/block allocation algorithms for flex_bg filesystems

The find_group_flex() inode allocator is now only used if the
filesystem is mounted using the "oldalloc" mount option.  It is
replaced with the original Orlov allocator that has been updated for
flex_bg filesystems (it should behave the same way if flex_bg is
disabled).  The inode allocator now functions by taking into account
each flex_bg group, instead of each block group, when deciding whether
or not it's time to allocate a new directory into a fresh flex_bg.

The block allocator has also been changed so that the first block
group in each flex_bg is preferred for use for storing directory
blocks.  This keeps directory blocks close together, which is good for
speeding up e2fsck since large directories are more likely to look
like this:

debugfs:  stat /home/tytso/Maildir/cur
Inode: 1844562   Type: directory    Mode:  0700   Flags: 0x81000
Generation: 1132745781    Version: 0x00000000:0000ad71
User: 15806   Group: 15806   Size: 1060864
File ACL: 0    Directory ACL: 0
Links: 2   Blockcount: 2072
Fragment:  Address: 0    Number: 0    Size: 0
 ctime: 0x499c0ff4:164961f4 -- Wed Feb 18 08:41:08 2009
 atime: 0x499c0ff4:00000000 -- Wed Feb 18 08:41:08 2009
 mtime: 0x49957f51:00000000 -- Fri Feb 13 09:10:25 2009
crtime: 0x499c0f57:00d51440 -- Wed Feb 18 08:38:31 2009
Size of extra inode fields: 28
BLOCKS:
(0):7348651, (1-258):7348654-7348911
TOTAL: 259

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: tighten restrictions on inode flags
Duane Griffin [Sun, 15 Feb 2009 23:09:20 +0000 (18:09 -0500)]
ext4: tighten restrictions on inode flags

At the moment there are few restrictions on which flags may be set on
which inodes.  Specifically DIRSYNC may only be set on directories and
IMMUTABLE and APPEND may not be set on links.  Tighten that to disallow
TOPDIR being set on non-directories and only NODUMP and NOATIME to be set
on non-regular file, non-directories.

Introduces a flags masking function which masks flags based on mode and
use it during inode creation and when flags are set via the ioctl to
facilitate future consistency.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Acked-by: Andreas Dilger <adilger@sun.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: don't inherit inappropriate inode flags from parent
Duane Griffin [Sun, 15 Feb 2009 23:57:26 +0000 (18:57 -0500)]
ext4: don't inherit inappropriate inode flags from parent

At present INDEX and EXTENTS are the only flags that new ext4 inodes do
NOT inherit from their parent.  In addition prevent the flags DIRTY,
ECOMPR, IMAGIC, TOPDIR, HUGE_FILE and EXT_MIGRATE from being inherited.
List inheritable flags explicitly to prevent future flags from
accidentally being inherited.

This fixes the TOPDIR flag inheritance bug reported at
http://bugzilla.kernel.org/show_bug.cgi?id=9866.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Acked-by: Andreas Dilger <adilger@sun.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: allocate ->s_blockgroup_lock separately
Pekka Enberg [Sun, 15 Feb 2009 23:07:52 +0000 (18:07 -0500)]
ext4: allocate ->s_blockgroup_lock separately

As spotted by kmemtrace, struct ext4_sb_info is 17664 bytes on 64-bit
which makes it a very bad fit for SLAB allocators.  The culprit of the
wasted memory is ->s_blockgroup_lock which can be as big as 16 KB when
NR_CPUS >= 32.

To fix that, allocate ->s_blockgroup_lock, which fits nicely in a order 2
page in the worst case, separately.  This shinks down struct ext4_sb_info
enough to fit a 2 KB slab cache so now we allocate 16 KB + 2 KB instead of
32 KB saving 14 KB of memory.

Acked-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: New rec_len encoding for very large blocksizes
Wei Yongjun [Sun, 15 Feb 2009 04:01:36 +0000 (23:01 -0500)]
ext4: New rec_len encoding for very large blocksizes

The rec_len field in the directory entry is 16 bits, so to encode
blocksizes larger than 64k becomes problematic.  This patch allows us
to supprot block sizes up to 256k, by using the low 2 bits to extend
the range of rec_len to 2**18-1 (since valid rec_len sizes must be a
multiple of 4).  We use the convention that a rec_len of 0 or 65535
means the filesystem block size, for compatibility with older kernels.

It's unlikely we'll see VM pages of up to 256k, but at some point we
might find that the Linux VM has been enhanced to support filesystem
block sizes > than the VM page size, at which point it might be useful
for some applications to allow very large filesystem block sizes.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Use unsigned int for blocksize in dx_make_map() and dx_pack_dirents()
Theodore Ts'o [Sun, 15 Feb 2009 02:46:54 +0000 (21:46 -0500)]
ext4: Use unsigned int for blocksize in dx_make_map() and dx_pack_dirents()

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: remove call to ext4_group_desc() in ext4_group_used_meta_blocks()
Theodore Ts'o [Fri, 6 Feb 2009 21:23:37 +0000 (16:23 -0500)]
ext4: remove call to ext4_group_desc() in ext4_group_used_meta_blocks()

The static function ext4_group_used_meta_blocks() only has one caller,
who already has access to the block group's group descriptor.  So it's
better to have ext4_init_block_bitmap() pass the group descriptor to
ext4_group_used_meta_blocks(), so it doesn't need to call
ext4_group_desc().  Previously this function did not check if
ext4_group_desc() returned NULL due to an error, potentially causing a
kernel OOPS report.  This avoids the issue entirely.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoext4: Remove stale block allocator references from ext4.h
Mike Snitzer [Fri, 6 Feb 2009 21:23:37 +0000 (16:23 -0500)]
ext4: Remove stale block allocator references from ext4.h

Remove some leftovers from when the old block allocator was removed
(c2ea3fde).  ext4_sb_info is now a bit lighter.  Also remove a dangling
read_block_bitmap() prototype.

Signed-off-by: Mike Snitzer <snitzer@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoMerge branch 'bzip2-lzma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 29 Mar 2009 20:05:41 +0000 (13:05 -0700)]
Merge branch 'bzip2-lzma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip

* 'bzip2-lzma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
  bzip2/lzma: don't ask for compression mode for the default initramfs
  bzip2/lzma: consistently capitalize LZMA in Kconfig
  bzip2/lzma: clarify the meaning of the CONFIG_RD_ options
  bzip2/lzma: move CONFIG_RD_* options under CONFIG_EMBEDDED

15 years agoFix build error in <linux/irq.h>
Ralf Baechle [Sun, 29 Mar 2009 10:59:50 +0000 (12:59 +0200)]
Fix build error in <linux/irq.h>

<linux/irq.h> relies on <linux/gfp.h> and <linux/topology.h> having been
included previous.  If not, the errors like below will result.

    CC      arch/mips/mti-malta/malta-int.o
  In file included from arch/mips/mti-malta/malta-int.c:25:
  include/linux/irq.h: In function ‘init_alloc_desc_masks’:
  include/linux/irq.h:444: error: implicit declaration of function ‘cpu_to_node’
  include/linux/irq.h:446: error: ‘GFP_ATOMIC’ undeclared (first use in this function)
  include/linux/irq.h:446: error: (Each undeclared identifier is reported only once
  include/linux/irq.h:446: error: for each function it appears in.)
  make[3]: *** [arch/mips/mti-malta/malta-int.o] Error 1
  make[2]: *** [arch/mips/mti-malta] Error 2
  make[1]: *** [sub-make] Error 2

Fixed by including the two missing headers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosched: fix errors in struct & function comments
Randy Dunlap [Sun, 29 Mar 2009 04:52:47 +0000 (21:52 -0700)]
sched: fix errors in struct & function comments

Fix kernel-doc errors in sched.c:  the structs don't have
kernel-doc notation and the short function description needs to
be one line only.

  Error(kernel/sched.c:3197): cannot understand prototype: 'struct sd_lb_stats '
  Error(kernel/sched.c:3228): cannot understand prototype: 'struct sg_lb_stats '
  Error(kernel/sched.c:3375): duplicate section name 'Description'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomaple: fix Error in kernel-doc notation
Randy Dunlap [Sun, 29 Mar 2009 04:50:17 +0000 (21:50 -0700)]
maple: fix Error in kernel-doc notation

Fix kernel-doc error in maple (it's not kernel-doc):

  Error(drivers/sh/maple/maple.c:782): cannot understand prototype: 'struct bus_type maple_bus_type = '

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 29 Mar 2009 00:32:14 +0000 (17:32 -0700)]
Merge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: remove the pointer math from double_unlock_hb, fix
  futex: remove the pointer math from double_unlock_hb
  futex: clean up fault logic
  futex: unlock before returning -EFAULT
  futex: use current->time_slack_ns for rt tasks too
  futex: add double_unlock_hb()
  futex: additional (get|put)_futex_key() fixes
  futex: update futex commentary

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sun, 29 Mar 2009 00:30:42 +0000 (17:30 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  smack: Add a new '-CIPSO' option to the network address label configuration
  netlabel: Cleanup the Smack/NetLabel code to fix incoming TCP connections
  lsm: Remove the socket_post_accept() hook
  selinux: Remove the "compat_net" compatibility code
  netlabel: Label incoming TCP connections correctly in SELinux
  lsm: Relocate the IPv4 security_inet_conn_request() hooks
  TOMOYO: Fix a typo.
  smack: convert smack to standard linux lists

15 years agoAnnotate struct fs_struct's usage count restriction
David Howells [Sat, 28 Mar 2009 23:23:01 +0000 (23:23 +0000)]
Annotate struct fs_struct's usage count restriction

Annotate struct fs_struct's usage count to indicate the restrictions upon it.
It may not be incremented, except by clone(CLONE_FS), as this affects the
check in check_unsafe_exec() in fs/exec.c.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofix setuid sometimes wouldn't
Hugh Dickins [Sat, 28 Mar 2009 23:21:27 +0000 (23:21 +0000)]
fix setuid sometimes wouldn't

check_unsafe_exec() also notes whether the fs_struct is being
shared by more threads than will get killed by the exec, and if so
sets LSM_UNSAFE_SHARE to make bprm_set_creds() careful about euid.
But /proc/<pid>/cwd and /proc/<pid>/root lookups make transient
use of get_fs_struct(), which also raises that sharing count.

This might occasionally cause a setuid program not to change euid,
in the same way as happened with files->count (check_unsafe_exec
also looks at sighand->count, but /proc doesn't raise that one).

We'd prefer exec not to unshare fs_struct: so fix this in procfs,
replacing get_fs_struct() by get_fs_path(), which does path_get
while still holding task_lock, instead of raising fs->count.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
___

 fs/proc/base.c |   50 +++++++++++++++--------------------------------
 1 file changed, 16 insertions(+), 34 deletions(-)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofix setuid sometimes doesn't
Hugh Dickins [Sat, 28 Mar 2009 23:20:19 +0000 (23:20 +0000)]
fix setuid sometimes doesn't

Joe Malicki reports that setuid sometimes doesn't: very rarely,
a setuid root program does not get root euid; and, by the way,
they have a health check running lsof every few minutes.

Right, check_unsafe_exec() notes whether the files_struct is being
shared by more threads than will get killed by the exec, and if so
sets LSM_UNSAFE_SHARE to make bprm_set_creds() careful about euid.
But /proc/<pid>/fd and /proc/<pid>/fdinfo lookups make transient
use of get_files_struct(), which also raises that sharing count.

There's a rather simple fix for this: exec's check on files->count
has been redundant ever since 2.6.1 made it unshare_files() (except
while compat_do_execve() omitted to do so) - just remove that check.

[Note to -stable: this patch will not apply before 2.6.29: earlier
releases should just remove the files->count line from unsafe_exec().]

Reported-by: Joe Malicki <jmalicki@metacarta.com>
Narrowed-down-by: Michael Itz <mitz@metacarta.com>
Tested-by: Joe Malicki <jmalicki@metacarta.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocompat_do_execve should unshare_files
Hugh Dickins [Sat, 28 Mar 2009 23:16:03 +0000 (23:16 +0000)]
compat_do_execve should unshare_files

2.6.26's commit fd8328be874f4190a811c58cd4778ec2c74d2c05
"sanitize handling of shared descriptor tables in failing execve()"
moved the unshare_files() from flush_old_exec() and several binfmts
to the head of do_execve(); but forgot to make the same change to
compat_do_execve(), leaving a CLONE_FILES files_struct shared across
exec from a 32-bit process on a 64-bit kernel.

It's arguable whether the files_struct really ought to be unshared
across exec; but 2.6.1 made that so to stop the loading binary's fd
leaking into other threads, and a 32-bit process on a 64-bit kernel
ought to behave in the same way as 32 on 32 and 64 on 64.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobzip2/lzma: don't ask for compression mode for the default initramfs
H. Peter Anvin [Sun, 29 Mar 2009 00:24:03 +0000 (17:24 -0700)]
bzip2/lzma: don't ask for compression mode for the default initramfs

Impact: Kconfig noise reduction, documentation

The default initramfs is so small that it makes no sense to worry
about the additional memory taken by not double-compressing it.
Therefore, don't bug the user with it.

Also, improve the description of the option, which was downright
incorrect.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agobzip2/lzma: consistently capitalize LZMA in Kconfig
H. Peter Anvin [Sat, 28 Mar 2009 23:10:59 +0000 (16:10 -0700)]
bzip2/lzma: consistently capitalize LZMA in Kconfig

Impact: message formatting

Consistently spell LZMA in all capitals, since it (unlike gzip or
bzip2) is an acronym.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agobzip2/lzma: clarify the meaning of the CONFIG_RD_ options
H. Peter Anvin [Sat, 28 Mar 2009 23:07:13 +0000 (16:07 -0700)]
bzip2/lzma: clarify the meaning of the CONFIG_RD_ options

Impact: Kconfig clarification

Make it clear that the CONFIG_RD_* options are about what formats are
supported, not about what formats are actually being used.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agobzip2/lzma: move CONFIG_RD_* options under CONFIG_EMBEDDED
H. Peter Anvin [Sat, 28 Mar 2009 22:49:08 +0000 (15:49 -0700)]
bzip2/lzma: move CONFIG_RD_* options under CONFIG_EMBEDDED

Impact: reduce Kconfig noise

Move the options that control possible initramfs/initrd compressions
underneath CONFIG_EMBEDDED.  The only impact of leaving these options
set to y is additional code in the init section of the kernel; there
is no reason to burden non-embedded users with these options.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge branch 'linus' into core/futexes
Ingo Molnar [Sat, 28 Mar 2009 22:24:12 +0000 (23:24 +0100)]
Merge branch 'linus' into core/futexes

15 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Sat, 28 Mar 2009 21:04:53 +0000 (14:04 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c-core: Some style cleanups
  i2c-piix4: Add support for the Broadcom HT1100 chipset
  i2c-piix4: Add support to SB800 SMBus changes
  i2c-pca-platform: Use defaults if no platform_data given
  i2c-algo-pca: Use timeout for checking the state machine
  i2c-algo-pca: Rework waiting for a free bus
  i2c-algo-pca: Add PCA9665 support
  i2c: Adapt debug macros for KERN_* constants
  i2c-davinci: Fix timeout handling
  i2c: Adapter timeout is in jiffies
  i2c: Set a default timeout value for all adapters
  i2c: Add missing KERN_* constants to printks
  i2c-algo-pcf: Handle timeout correctly
  i2c-algo-pcf: Style cleanups
  eeprom/at24: Remove EXPERIMENTAL
  i2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79
  i2c: Clarify which clients are auto-removed
  i2c: Let checkpatch shout on users of the legacy model
  i2c: Document the different ways to instantiate i2c devices

15 years agoMerge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sat, 28 Mar 2009 21:03:14 +0000 (14:03 -0700)]
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm

* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits)
  [ARM] 5435/1: fix compile warning in sanity_check_meminfo()
  [ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
  [ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
  [ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
  imxfb: Fix TFT mode
  i.MX21/27: remove ifdef CONFIG_FB_IMX
  imxfb: add clock support
  mxc: add arch_reset() function
  clkdev: add possibility to get a clock based on the device name
  i.MX1: remove fb support from mach-imx
  [ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined
  Gemini: Add support for Teltonika RUT100
  Gemini: gpiolib based GPIO support v2
  MAINTAINERS: add myself as Gemini architecture maintainer
  ARM: Add Gemini architecture v3
  [ARM] OMAP: Fix compile for omap2_init_common_hw()
  MAINTAINERS: Add myself as Faraday ARM core variant maintainer
  ARM: Add support for FA526 v2
  [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h
  [ARM] collie: fix two minor formatting nits
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-async-for-30
Linus Torvalds [Sat, 28 Mar 2009 21:00:33 +0000 (14:00 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-async-for-30

* git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-async-for-30:
  fastboot: remove duplicate unpack_to_rootfs()
  ide/net: flip the order of SATA and network init
  async: remove the temporary (2.6.29) "async is off by default" code

Fix up conflicts in init/initramfs.c manually

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Sat, 28 Mar 2009 20:55:49 +0000 (13:55 -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:
  Blackfin arch: be less noisy when gets a gpio conflict after kernel has booted
  Blackfin arch: add RSI's definitions to bf514 and bf516
  Blackfin arch: add link-time asserts to make sure on-chip regions dont overflow
  Blackfin arch: sport spi needs 6 gpio pins
  Blackfin arch: add sport-spi related resource stuff to board file
  Blackfin arch: Blacklist Hibernate (PM_SUSPEND_MEM) on BF561 as well
  Blackfin arch: Privide BF537-STAMP platform data of ADP5520 Multifunction driver
  Blackfin arch: enable the platfrom PATA driver with CF Cards
  Blackfin arch: clean up sports header file
  Blackfin arch: convert BF5{18,27,48}_FAMILY to CONFIG_BF{51,52,54}x
  Blackfin arch: bf51x processors also have 8 timers
  Blackfin arch: add a check to make sure only Blackfin GPIOs may generate IRQs
  Blackfin arch: update default kernel configuration
  Blackfin arch: include linux headers that this one uses definitions from fro sport drivers

15 years agoMerge branch 'percpu-cpumask-x86-for-linus-2' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 28 Mar 2009 20:40:20 +0000 (13:40 -0700)]
Merge branch 'percpu-cpumask-x86-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'percpu-cpumask-x86-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (682 commits)
  percpu: fix spurious alignment WARN in legacy SMP percpu allocator
  percpu: generalize embedding first chunk setup helper
  percpu: more flexibility for @dyn_size of pcpu_setup_first_chunk()
  percpu: make x86 addr <-> pcpu ptr conversion macros generic
  linker script: define __per_cpu_load on all SMP capable archs
  x86: UV: remove uv_flush_tlb_others() WARN_ON
  percpu: finer grained locking to break deadlock and allow atomic free
  percpu: move fully free chunk reclamation into a work
  percpu: move chunk area map extension out of area allocation
  percpu: replace pcpu_realloc() with pcpu_mem_alloc() and pcpu_mem_free()
  x86, percpu: setup reserved percpu area for x86_64
  percpu, module: implement reserved allocation and use it for module percpu variables
  percpu: add an indirection ptr for chunk page map access
  x86: make embedding percpu allocator return excessive free space
  percpu: use negative for auto for pcpu_setup_first_chunk() arguments
  percpu: improve first chunk initial area map handling
  percpu: cosmetic renames in pcpu_setup_first_chunk()
  percpu: clean up percpu constants
  x86: un-__init fill_pud/pmd/pte
  x86: remove vestigial fix_ioremap prototypes
  ...

Manually merge conflicts in arch/ia64/kernel/irq_ia64.c

15 years agoi2c-core: Some style cleanups
Zhenwen Xu [Sat, 28 Mar 2009 20:34:46 +0000 (21:34 +0100)]
i2c-core: Some style cleanups

Some lines over 80.
The printk(KERN_ERR ... ) should be dev_err.
And some blankspace should be deleted.

Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
Signed-off-by: Jean Delvare <khlai@linux-fr.org>
15 years agoi2c-piix4: Add support for the Broadcom HT1100 chipset
Flavio Leitner [Sat, 28 Mar 2009 20:34:46 +0000 (21:34 +0100)]
i2c-piix4: Add support for the Broadcom HT1100 chipset

Add support for the Broadcom HT1100 LD chipset (SMBus function.)

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c-piix4: Add support to SB800 SMBus changes
Shane Huang [Sat, 28 Mar 2009 20:34:46 +0000 (21:34 +0100)]
i2c-piix4: Add support to SB800 SMBus changes

Add support for the AMD SB800 Family series of products.
Major changes include the changes to addressing the SMBus registers at different
location from the locations in the previous compatible parts from AMD such as
SB400/SB600/SB700. For SB800, the main features and register definitions of
SMBus and other interfaces are still compatible with the previous products with
the only change being in how to access the internal registers for these blocks.

Signed-off-by: Shane Huang <shane.huang@amd.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c-pca-platform: Use defaults if no platform_data given
Wolfram Sang [Sat, 28 Mar 2009 20:34:45 +0000 (21:34 +0100)]
i2c-pca-platform: Use defaults if no platform_data given

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c-algo-pca: Use timeout for checking the state machine
Wolfram Sang [Sat, 28 Mar 2009 20:34:45 +0000 (21:34 +0100)]
i2c-algo-pca: Use timeout for checking the state machine

We now timeout also if the state machine does not change within the
given time. For that, the driver-specific completion-functions are
extended to return true or false depending on the timeout. This then
gets checked in the algorithm.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c-algo-pca: Rework waiting for a free bus
Wolfram Sang [Sat, 28 Mar 2009 20:34:45 +0000 (21:34 +0100)]
i2c-algo-pca: Rework waiting for a free bus

Waiting for a free bus now accepts the timeout value in jiffies and does
proper checking using time_before.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c-algo-pca: Add PCA9665 support
Marco Aurelio da Costa [Sat, 28 Mar 2009 20:34:44 +0000 (21:34 +0100)]
i2c-algo-pca: Add PCA9665 support

Add support for the PCA9665 I2C controller.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Adapt debug macros for KERN_* constants
Frank Seidel [Sat, 28 Mar 2009 20:34:44 +0000 (21:34 +0100)]
i2c: Adapt debug macros for KERN_* constants

According to kerneljanitors todo list all printk calls (beginning
a new line) should have an according KERN_* constant.
Those are the changes to the debug macros in the i2c subsystem
to meet this requirement. Also changing no-debug statements
to raw printks again.

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
15 years agoi2c-davinci: Fix timeout handling
Jean Delvare [Sat, 28 Mar 2009 20:34:43 +0000 (21:34 +0100)]
i2c-davinci: Fix timeout handling

Properly set the adapter timeout value in jiffies, and then use that
value in the driver, rather than a hard-coded constant.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Troy Kisky <troy.kisky@boundarydevices.com>
Cc: Kevin Hilman <khilman@mvista.com>
15 years agoi2c: Adapter timeout is in jiffies
Jean Delvare [Sat, 28 Mar 2009 20:34:43 +0000 (21:34 +0100)]
i2c: Adapter timeout is in jiffies

i2c_adapter.timeout is in jiffies. Fix all drivers which thought
otherwise. It didn't really matter as long as the value was only used
inside the driver, but soon i2c-core will use it too so it must have
the proper unit.

Note: for the i2c-mpc driver, this fixes a bug in polling mode.
Timeout would trigger after 1 jiffy, which is most probably not what
the author wanted.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Clifford Wolf <clifford@clifford.at>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Mark A. Greer <mgreer@mvista.com>
15 years agoi2c: Set a default timeout value for all adapters
Jean Delvare [Sat, 28 Mar 2009 20:34:43 +0000 (21:34 +0100)]
i2c: Set a default timeout value for all adapters

Setting a default timeout value on a per-algo basis doesn't make any
sense. Move the default value setting to i2c-core. Individual adapter
drivers can specify a different (non-zero) value if they wish.

Also express the timeout value in a way which results in the same
duration regarless of the value of HZ.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
15 years agoi2c: Add missing KERN_* constants to printks
Frank Seidel [Sat, 28 Mar 2009 20:34:42 +0000 (21:34 +0100)]
i2c: Add missing KERN_* constants to printks

According to kerneljanitors todo list all printk calls (beginning
a new line) should have an according KERN_* constant.
Those are the missing pieces here for the i2c subsystem.

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c-algo-pcf: Handle timeout correctly
Roel Kluin [Sat, 28 Mar 2009 20:34:42 +0000 (21:34 +0100)]
i2c-algo-pcf: Handle timeout correctly

With a postfix decrement these timeouts reach -1 rather than 0, but after the
loop it is tested whether they have become 0.

As pointed out by Jean Delvare, the msg_num should be tested before the timeout.
With the current order, you could exit with a timeout error while all the
messages were successfully transferred.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Eric Brower <ebrower@gmail.com>
15 years agoi2c-algo-pcf: Style cleanups
Roel Kluin [Sat, 28 Mar 2009 20:34:42 +0000 (21:34 +0100)]
i2c-algo-pcf: Style cleanups

cleanup whitespace, fix comments and remove the unused STUB_I2C.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Eric Brower <ebrower@gmail.com>
15 years agoeeprom/at24: Remove EXPERIMENTAL
Wolfram Sang [Sat, 28 Mar 2009 20:34:41 +0000 (21:34 +0100)]
eeprom/at24: Remove EXPERIMENTAL

This driver has been widely used since inclusion and no problems have
been reported.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79
Jean Delvare [Sat, 28 Mar 2009 20:34:41 +0000 (21:34 +0100)]
i2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79

The MCP78S and MCP79 appear to be compatible with the previous nForce
chips as far as the SMBus controller is concerned. The MCP67 and MCP73
were not tested yet but I'd be very surprised if they weren't
compatible too.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Oleg Ryjkov <olegr@olegr.ca>
Cc: Malcolm Lalkaka <mlalkaka@gmail.com>
Cc: Zbigniew Luszpinski <zbiggy@o2.pl>
15 years agoi2c: Clarify which clients are auto-removed
Jean Delvare [Sat, 28 Mar 2009 20:34:40 +0000 (21:34 +0100)]
i2c: Clarify which clients are auto-removed

The automatic removal of i2c clients only affects the clients which
were created automatically in the first place. Add a comment saying
that to avoid any confusion.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Let checkpatch shout on users of the legacy model
Jean Delvare [Sat, 28 Mar 2009 20:34:40 +0000 (21:34 +0100)]
i2c: Let checkpatch shout on users of the legacy model

As suggested by Mauro Carvalho Chehab.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoi2c: Document the different ways to instantiate i2c devices
Jean Delvare [Sat, 28 Mar 2009 20:34:40 +0000 (21:34 +0100)]
i2c: Document the different ways to instantiate i2c devices

On popular demand, here comes some documentation about how to
instantiate i2c devices in the new (standard) i2c device driver
binding model.

I have also clarified how the class bitfield lets driver authors
control which buses are probed in the auto-detect case, and warned
more loudly against the abuse of this method.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Michael Lawnick <nospam_lawnick@gmx.de>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Sat, 28 Mar 2009 20:31:33 +0000 (13:31 -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] Fix kstat_this_cpu build breakage

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Sat, 28 Mar 2009 20:30:43 +0000 (13:30 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (119 commits)
  [SCSI] scsi_dh_rdac: Retry for NOT_READY check condition
  [SCSI] mpt2sas: make global symbols unique
  [SCSI] sd: Make revalidate less chatty
  [SCSI] sd: Try READ CAPACITY 16 first for SBC-2 devices
  [SCSI] sd: Refactor sd_read_capacity()
  [SCSI] mpt2sas v00.100.11.15
  [SCSI] mpt2sas: add MPT2SAS_MINOR(221) to miscdevice.h
  [SCSI] ch: Add scsi type modalias
  [SCSI] 3w-9xxx: add power management support
  [SCSI] bsg: add linux/types.h include to bsg.h
  [SCSI] cxgb3i: fix function descriptions
  [SCSI] libiscsi: fix possbile null ptr session command cleanup
  [SCSI] iscsi class: remove host no argument from session creation callout
  [SCSI] libiscsi: pass session failure a session struct
  [SCSI] iscsi lib: remove qdepth param from iscsi host allocation
  [SCSI] iscsi lib: have lib create work queue for transmitting IO
  [SCSI] iscsi class: fix lock dep warning on logout
  [SCSI] libiscsi: don't cap queue depth in iscsi modules
  [SCSI] iscsi_tcp: replace scsi_debug/tcp_debug logging with iscsi conn logging
  [SCSI] libiscsi_tcp: replace tcp_debug/scsi_debug logging with session/conn logging
  ...

15 years agoMerge branch 'master' into devel
Russell King [Sat, 28 Mar 2009 20:30:18 +0000 (20:30 +0000)]
Merge branch 'master' into devel

Conflicts:
arch/arm/include/asm/elf.h
arch/arm/kernel/module.c

15 years agoMerge branch 'origin' into devel
Russell King [Sat, 28 Mar 2009 20:29:51 +0000 (20:29 +0000)]
Merge branch 'origin' into devel

Conflicts:
sound/soc/pxa/pxa2xx-i2s.c

15 years ago[ARM] 5435/1: fix compile warning in sanity_check_meminfo()
Mikael Pettersson [Sat, 28 Mar 2009 18:18:05 +0000 (19:18 +0100)]
[ARM] 5435/1: fix compile warning in sanity_check_meminfo()

Compiling recent 2.6.29-rc kernels for ARM gives me the following warning:

arch/arm/mm/mmu.c: In function 'sanity_check_meminfo':
arch/arm/mm/mmu.c:697: warning: comparison between pointer and integer

This is because commit 3fd9825c42c784a59b3b90bdf073f49d4bb42a8d
"[ARM] 5402/1: fix a case of wrap-around in sanity_check_meminfo()"
in 2.6.29-rc5-git4 added a comparison of a pointer with PAGE_OFFSET,
which is an integer.

Fixed by casting PAGE_OFFSET to void *.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agofastboot: remove duplicate unpack_to_rootfs()
Li, Shaohua [Wed, 13 Aug 2008 09:26:01 +0000 (17:26 +0800)]
fastboot: remove duplicate unpack_to_rootfs()

we check if initrd is initramfs first and then do the real unpack. The check
isn't required, we can directly do unpack.  If the initrd isn't an
initramfs, we can remove the garbage.  In my laptop, this saves 0.1s boot
time.

This patch penalizes non-initramfs initrd case, but nowadays, initramfs is
the most widely used method for initrds.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoide/net: flip the order of SATA and network init
Arjan van de Ven [Tue, 27 Jan 2009 02:58:11 +0000 (18:58 -0800)]
ide/net: flip the order of SATA and network init

this patch flips the order in which sata and network drivers are initialized.

SATA probing takes quite a bit of time, and with the asynchronous infrastructure
other drivers that run after it can execute in parallel. Network drivers do tend
to take some real time talking to the hardware, so running these later is
a good thing (the sata probe then runs concurrent)

This saves about 15% of my kernels boot time.

Both Dave and Jeff acked this patch and suggested it should go via the async
tree.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jeff@garzik.org>
15 years agoasync: remove the temporary (2.6.29) "async is off by default" code
Arjan van de Ven [Sun, 15 Mar 2009 18:11:44 +0000 (11:11 -0700)]
async: remove the temporary (2.6.29) "async is off by default" code

Now that everyone has been able to test the async code (and it's being used
in the Moblin betas by default), we can enable it by default.
The various fixes needed have gone into 2.6.29 already.

[With an important bugfix from Stefan Richter]

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
15 years ago[ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
Tony Lindgren [Sat, 28 Mar 2009 17:53:31 +0000 (18:53 +0100)]
[ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx

OMAP34XX_MAILBOX_BASE must be defined both for 24xx and 34xx.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoBlackfin arch: be less noisy when gets a gpio conflict after kernel has booted
Robin Getz [Sat, 28 Mar 2009 17:10:30 +0000 (01:10 +0800)]
Blackfin arch: be less noisy when gets a gpio conflict after kernel has booted

Once the kernel has booted - be less noisy when someone does a modprobe
(and gets a gpio conflict).

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add RSI's definitions to bf514 and bf516
Cliff Cai [Sat, 28 Mar 2009 17:03:20 +0000 (01:03 +0800)]
Blackfin arch: add RSI's definitions to bf514 and bf516

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add link-time asserts to make sure on-chip regions dont overflow
Mike Frysinger [Sat, 28 Mar 2009 16:47:31 +0000 (00:47 +0800)]
Blackfin arch: add link-time asserts to make sure on-chip regions dont overflow

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: sport spi needs 6 gpio pins
Cliff Cai [Sat, 28 Mar 2009 15:31:43 +0000 (23:31 +0800)]
Blackfin arch: sport spi needs 6 gpio pins

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add sport-spi related resource stuff to board file
Cliff Cai [Sat, 28 Mar 2009 15:28:51 +0000 (23:28 +0800)]
Blackfin arch: add sport-spi related resource stuff to board file

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Blacklist Hibernate (PM_SUSPEND_MEM) on BF561 as well
Michael Hennerich [Sat, 28 Mar 2009 15:14:41 +0000 (23:14 +0800)]
Blackfin arch: Blacklist Hibernate (PM_SUSPEND_MEM) on BF561 as well

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoMerge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Russell King [Sat, 28 Mar 2009 14:18:11 +0000 (14:18 +0000)]
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel

15 years agoMerge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa...
Russell King [Sat, 28 Mar 2009 14:15:43 +0000 (14:15 +0000)]
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel

15 years agoBlackfin arch: Privide BF537-STAMP platform data of ADP5520 Multifunction driver
Michael Hennerich [Sat, 28 Mar 2009 14:15:07 +0000 (22:15 +0800)]
Blackfin arch: Privide BF537-STAMP platform data of ADP5520 Multifunction driver

ADP5520 Multifunction LCD Backlight and Keypad Input Device Driver

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: enable the platfrom PATA driver with CF Cards
Michael Hennerich [Sat, 28 Mar 2009 14:13:43 +0000 (22:13 +0800)]
Blackfin arch: enable the platfrom PATA driver with CF Cards

Provide option to use the platfrom PATA driver with CF Cards
on the CF-IDE-NAND Add-On-Card in Common Memory Mode

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: clean up sports header file
Mike Frysinger [Sat, 28 Mar 2009 12:38:17 +0000 (20:38 +0800)]
Blackfin arch: clean up sports header file

Remove redundancy of the name err_irq

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: convert BF5{18,27,48}_FAMILY to CONFIG_BF{51,52,54}x
Mike Frysinger [Sat, 28 Mar 2009 12:32:57 +0000 (20:32 +0800)]
Blackfin arch: convert BF5{18,27,48}_FAMILY to CONFIG_BF{51,52,54}x

convert BF5{18,27,48}_FAMILY to CONFIG_BF{51,52,54}x as the defines
are redundant in these cases

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: bf51x processors also have 8 timers
Mike Frysinger [Sat, 28 Mar 2009 12:31:33 +0000 (20:31 +0800)]
Blackfin arch: bf51x processors also have 8 timers

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: add a check to make sure only Blackfin GPIOs may generate IRQs
Michael Hennerich [Sat, 28 Mar 2009 13:18:45 +0000 (21:18 +0800)]
Blackfin arch: add a check to make sure only Blackfin GPIOs may generate IRQs

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: update default kernel configuration
Sonic Zhang [Sat, 28 Mar 2009 15:46:17 +0000 (23:46 +0800)]
Blackfin arch: update default kernel configuration

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years ago[ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
Marek Vasut [Sat, 28 Mar 2009 09:56:28 +0000 (17:56 +0800)]
[ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
Daniel Mack [Fri, 27 Mar 2009 21:00:09 +0000 (22:00 +0100)]
[ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins

Reported-by: Matthias Meier <matthias.j.meier@gmx.net>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years agoBlackfin arch: include linux headers that this one uses definitions from fro sport...
Mike Frysinger [Sat, 28 Mar 2009 09:43:01 +0000 (17:43 +0800)]
Blackfin arch: include linux headers that this one uses definitions from fro sport drivers

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agosmack: Add a new '-CIPSO' option to the network address label configuration
Etienne Basset [Fri, 27 Mar 2009 21:11:01 +0000 (17:11 -0400)]
smack: Add a new '-CIPSO' option to the network address label configuration

This patch adds a new special option '-CIPSO' to the Smack subsystem. When used
in the netlabel list, it means "use CIPSO networking". A use case is when your
local network speaks CIPSO and you want also to connect to the unlabeled
Internet. This patch also add some documentation describing that. The patch
also corrects an oops when setting a '' SMACK64 xattr to a file.

Signed-off-by: Etienne Basset <etienne.basset@numericable.fr>
Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agonetlabel: Cleanup the Smack/NetLabel code to fix incoming TCP connections
Paul Moore [Fri, 27 Mar 2009 21:10:54 +0000 (17:10 -0400)]
netlabel: Cleanup the Smack/NetLabel code to fix incoming TCP connections

This patch cleans up a lot of the Smack network access control code.  The
largest changes are to fix the labeling of incoming TCP connections in a
manner similar to the recent SELinux changes which use the
security_inet_conn_request() hook to label the request_sock and let the label
move to the child socket via the normal network stack mechanisms.  In addition
to the incoming TCP connection fixes this patch also removes the smk_labled
field from the socket_smack struct as the minor optimization advantage was
outweighed by the difficulty in maintaining it's proper state.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agolsm: Remove the socket_post_accept() hook
Paul Moore [Fri, 27 Mar 2009 21:10:48 +0000 (17:10 -0400)]
lsm: Remove the socket_post_accept() hook

The socket_post_accept() hook is not currently used by any in-tree modules
and its existence continues to cause problems by confusing people about
what can be safely accomplished using this hook.  If a legitimate need for
this hook arises in the future it can always be reintroduced.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agoselinux: Remove the "compat_net" compatibility code
Paul Moore [Fri, 27 Mar 2009 21:10:41 +0000 (17:10 -0400)]
selinux: Remove the "compat_net" compatibility code

The SELinux "compat_net" is marked as deprecated, the time has come to
finally remove it from the kernel.  Further code simplifications are
likely in the future, but this patch was intended to be a simple,
straight-up removal of the compat_net code.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agonetlabel: Label incoming TCP connections correctly in SELinux
Paul Moore [Fri, 27 Mar 2009 21:10:34 +0000 (17:10 -0400)]
netlabel: Label incoming TCP connections correctly in SELinux

The current NetLabel/SELinux behavior for incoming TCP connections works but
only through a series of happy coincidences that rely on the limited nature of
standard CIPSO (only able to convey MLS attributes) and the write equality
imposed by the SELinux MLS constraints.  The problem is that network sockets
created as the result of an incoming TCP connection were not on-the-wire
labeled based on the security attributes of the parent socket but rather based
on the wire label of the remote peer.  The issue had to do with how IP options
were managed as part of the network stack and where the LSM hooks were in
relation to the code which set the IP options on these newly created child
sockets.  While NetLabel/SELinux did correctly set the socket's on-the-wire
label it was promptly cleared by the network stack and reset based on the IP
options of the remote peer.

This patch, in conjunction with a prior patch that adjusted the LSM hook
locations, works to set the correct on-the-wire label format for new incoming
connections through the security_inet_conn_request() hook.  Besides the
correct behavior there are many advantages to this change, the most significant
is that all of the NetLabel socket labeling code in SELinux now lives in hooks
which can return error codes to the core stack which allows us to finally get
ride of the selinux_netlbl_inode_permission() logic which greatly simplfies
the NetLabel/SELinux glue code.  In the process of developing this patch I
also ran into a small handful of AF_INET6 cleanliness issues that have been
fixed which should make the code safer and easier to extend in the future.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agolsm: Relocate the IPv4 security_inet_conn_request() hooks
Paul Moore [Fri, 27 Mar 2009 21:10:28 +0000 (17:10 -0400)]
lsm: Relocate the IPv4 security_inet_conn_request() hooks

The current placement of the security_inet_conn_request() hooks do not allow
individual LSMs to override the IP options of the connection's request_sock.
This is a problem as both SELinux and Smack have the ability to use labeled
networking protocols which make use of IP options to carry security attributes
and the inability to set the IP options at the start of the TCP handshake is
problematic.

This patch moves the IPv4 security_inet_conn_request() hooks past the code
where the request_sock's IP options are set/reset so that the LSM can safely
manipulate the IP options as needed.  This patch intentionally does not change
the related IPv6 hooks as IPv6 based labeling protocols which use IPv6 options
are not currently implemented, once they are we will have a better idea of
the correct placement for the IPv6 hooks.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds...
James Morris [Sat, 28 Mar 2009 03:57:13 +0000 (14:57 +1100)]
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next

15 years agoMerge branch 'linus' into percpu-cpumask-x86-for-linus-2
Ingo Molnar [Sat, 28 Mar 2009 03:21:18 +0000 (04:21 +0100)]
Merge branch 'linus' into percpu-cpumask-x86-for-linus-2

Conflicts:
arch/sparc/kernel/time_64.c
drivers/gpu/drm/drm_proc.c

Manual merge to resolve build warning due to phys_addr_t type change
on x86:

drivers/gpu/drm/drm_info.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 28 Mar 2009 01:35:03 +0000 (18:35 -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: (166 commits)
  Revert "ax25: zero length frame filtering in AX25"
  Revert "netrom: zero length frame filtering in NetRom"
  cfg80211: default CONFIG_WIRELESS_OLD_REGULATORY to n
  mac80211/iwlwifi: move virtual A-MDPU queue bookkeeping to iwlwifi
  mac80211: fix aggregation to not require queue stop
  mac80211: add skb length sanity checking
  mac80211: unify and fix TX aggregation start
  mac80211: clean up __ieee80211_tx args
  mac80211: rework the pending packets code
  mac80211: fix A-MPDU queue assignment
  mac80211: rewrite fragmentation
  iwlwifi: show current driver status in user readable format
  b43: Add BCM4307 PCI-ID
  cfg80211: fix locking in nl80211_set_wiphy
  mac80211: fix RX path
  ath5k: properly drop packets from ops->tx
  ar9170: single module build
  ath9k: fix dma mapping leak of rx buffer upon rmmod
  rt2x00: New USB ID for rt73usb
  ath5k: warn and correct rate for unknown hw rate indexes
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sat, 28 Mar 2009 01:34:34 +0000 (18:34 -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: We need to use compat_sys_ustat() as well.
  sparc64: Fix MM refcount check in smp_flush_tlb_pending().

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Sat, 28 Mar 2009 01:33:56 +0000 (18:33 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (53 commits)
  DVB: firedtv: FireDTV S2 problems with tuning solved
  DVB: firedtv: fix printk format mismatch
  ieee1394: constify device ID tables
  ieee1394: raw1394: add sparse annotations to raw1394_compat_write
  ieee1394: Storage class should be before const qualifier
  ieee1394: sbp2: follow up on "ieee1394: inherit ud vendor_id from node vendor_id"
  firewire: core: optimize propagation of BROADCAST_CHANNEL
  firewire: core: simplify broadcast channel allocation
  firewire: core: increase bus manager grace period
  firewire: core: drop unused call parameters of close_transaction
  firewire: cdev: add closure to async stream ioctl
  firewire: cdev: simplify FW_CDEV_IOC_SEND_REQUEST return value
  firewire: cdev: fix race of ioctl_send_request with bus reset
  firewire: cdev: secure add_descriptor ioctl
  firewire: cdev: amendment to "add ioctl to query maximum transmission speed"
  firewire: broadcast channel support
  firewire: implement asynchronous stream transmission
  firewire: core: normalize a function argument name
  firewire: normalize a variable name
  firewire: core: remove condition which is always false
  ...

15 years agosparc64: We need to use compat_sys_ustat() as well.
David S. Miller [Sat, 28 Mar 2009 01:15:02 +0000 (18:15 -0700)]
sparc64: We need to use compat_sys_ustat() as well.

Sparc was missed in commit 2b1c6bd77d4e6a727ffac8630cd154b2144b751a
("generic compat_sys_ustat").  We definitely need it, since our
__kernel_ino_t is "unsigned long".

Signed-off-by: David S. Miller <davem@davemloft.net>