pandora-kernel.git
15 years agobio: add documentation to bio_alloc()
Jens Axboe [Wed, 15 Apr 2009 07:00:07 +0000 (09:00 +0200)]
bio: add documentation to bio_alloc()

Explain that with __GFP_WAIT set it will not fail, and that the caller
must never allocate more than 1 bio at the time.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agosplice: add helpers for locking pipe inode
Miklos Szeredi [Tue, 14 Apr 2009 17:48:41 +0000 (19:48 +0200)]
splice: add helpers for locking pipe inode

There are lots of sequences like this, especially in splice code:

if (pipe->inode)
mutex_lock(&pipe->inode->i_mutex);
/* do something */
if (pipe->inode)
mutex_unlock(&pipe->inode->i_mutex);

so introduce helpers which do the conditional locking and unlocking.
Also replace the inode_double_lock() call with a pipe_double_lock()
helper to avoid spreading the use of this functionality beyond the
pipe code.

This patch is just a cleanup, and should cause no behavioral changes.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agosplice: remove generic_file_splice_write_nolock()
Miklos Szeredi [Tue, 14 Apr 2009 17:48:40 +0000 (19:48 +0200)]
splice: remove generic_file_splice_write_nolock()

Remove the now unused generic_file_splice_write_nolock() function.
It's conceptually broken anyway, because splice may need to wait for
pipe events so holding locks across the whole operation is wrong.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoocfs2: fix i_mutex locking in ocfs2_splice_to_file()
Miklos Szeredi [Tue, 14 Apr 2009 17:48:39 +0000 (19:48 +0200)]
ocfs2: fix i_mutex locking in ocfs2_splice_to_file()

Rearrange locking of i_mutex on destination and call to
ocfs2_rw_lock() so locks are only held while buffers are copied with
the pipe_to_file() actor, and not while waiting for more data on the
pipe.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agosplice: fix i_mutex locking in generic_splice_write()
Miklos Szeredi [Tue, 14 Apr 2009 17:48:38 +0000 (19:48 +0200)]
splice: fix i_mutex locking in generic_splice_write()

Rearrange locking of i_mutex on destination so it's only held while
buffers are copied with the pipe_to_file() actor, and not while
waiting for more data on the pipe.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agosplice: remove i_mutex locking in splice_from_pipe()
Miklos Szeredi [Tue, 14 Apr 2009 17:48:37 +0000 (19:48 +0200)]
splice: remove i_mutex locking in splice_from_pipe()

splice_from_pipe() is only called from two places:

  - generic_splice_sendpage()
  - splice_write_null()

Neither of these require i_mutex to be taken on the destination inode.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agosplice: split up __splice_from_pipe()
Miklos Szeredi [Tue, 14 Apr 2009 17:48:36 +0000 (19:48 +0200)]
splice: split up __splice_from_pipe()

Split up __splice_from_pipe() into four helper functions:

  splice_from_pipe_begin()
  splice_from_pipe_next()
  splice_from_pipe_feed()
  splice_from_pipe_end()

splice_from_pipe_next() will wait (if necessary) for more buffers to
be added to the pipe.  splice_from_pipe_feed() will feed the buffers
to the supplied actor and return when there's no more data available
(or if all of the requested data has been copied).

This is necessary so that implementations can do locking around the
non-waiting splice_from_pipe_feed().

This patch should not cause any change in behavior.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: fix SG_IO to return a proper error value
FUJITA Tomonori [Mon, 13 Apr 2009 18:03:10 +0000 (20:03 +0200)]
block: fix SG_IO to return a proper error value

blk_rq_unmap_user() returns -EFAULT if a program passes an invalid
address to kernel. SG_IO path needs to pass the returned value to user
space instead of ignoring it.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoALSA: add missing definitions(letters) to HD-Audio.txt
Justin Mattock [Tue, 14 Apr 2009 21:31:21 +0000 (14:31 -0700)]
ALSA: add missing definitions(letters) to HD-Audio.txt

impact: Add missing definitions(letters).

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'topic/memdup_user' into for-linus
Takashi Iwai [Wed, 15 Apr 2009 09:24:27 +0000 (11:24 +0200)]
Merge branch 'topic/memdup_user' into for-linus

* topic/memdup_user:
  ALSA: sound/pci: use memdup_user()
  ALSA: sound/usb: use memdup_user()
  ALSA: sound/isa: use memdup_user()
  ALSA: sound/core: use memdup_user()

15 years agoMerge branch 'topic/usb-caiaq' into for-linus
Takashi Iwai [Wed, 15 Apr 2009 09:24:22 +0000 (11:24 +0200)]
Merge branch 'topic/usb-caiaq' into for-linus

* topic/usb-caiaq:
  ALSA: snd-usb-caiaq: rename files to remove redundant information in file pathes
  ALSA: snd-usb-caiaq: clean up header includes

15 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Wed, 15 Apr 2009 09:24:14 +0000 (11:24 +0200)]
Merge branch 'topic/asoc' into for-linus

* topic/asoc:
  ASoC: Disable S3C64xx support in Kconfig
  ASoC: magician: remove un-necessary #include of pxa-regs.h and hardware.h

15 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Wed, 15 Apr 2009 09:24:09 +0000 (11:24 +0200)]
Merge branch 'topic/hda' into for-linus

* topic/hda:
  ALSA: hda - Add quirk mask for Fujitsu Amilo laptops with ALC883
  ALSA: hda - Avoid call of snd_jack_report at release
  ALSA: add private_data to struct snd_jack

15 years agoMerge branch 'topic/jack-free-fix' into topic/hda
Takashi Iwai [Wed, 15 Apr 2009 09:23:44 +0000 (11:23 +0200)]
Merge branch 'topic/jack-free-fix' into topic/hda

* topic/jack-free-fix:
  ALSA: hda - Avoid call of snd_jack_report at release
  ALSA: add private_data to struct snd_jack

15 years agoMerge branch 'master' of git://git.alsa-project.org/alsa-kernel into for-linus
Takashi Iwai [Wed, 15 Apr 2009 09:21:13 +0000 (11:21 +0200)]
Merge branch 'master' of git://git.alsa-project.org/alsa-kernel into for-linus

* 'master' of git://git.alsa-project.org/alsa-kernel:
  [ALSA] intel8x0: add one retry to the ac97_clock measurement routine
  [ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine
  [ALSA] intel8x0: do not use zero value from PICB register
  [ALSA] intel8x0: an attempt to make ac97_clock measurement more reliable
  [ALSA] pcm-midlevel: Add more strict buffer position checks based on jiffies
  [ALSA] hda_intel: fix unexpected ring buffer positions

15 years agoGFS2: Use DEFINE_SPINLOCK
Xu Gang [Tue, 14 Apr 2009 06:54:14 +0000 (14:54 +0800)]
GFS2: Use DEFINE_SPINLOCK

SPIN_LOCK_UNLOCKED is deprecated, use DEFINE_SPINLOCK instead.
(as suggested in Documentation/spinlocks.txt)

Signed-off-by: Xu Gang <xug@cn.fujitsu.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years agoGFS2: cleanup file_operations mess
Christoph Hellwig [Tue, 7 Apr 2009 17:42:17 +0000 (19:42 +0200)]
GFS2: cleanup file_operations mess

Remove the weird pointer to file_operations mess and replace it with
straight-forward defining of the lockinginstance names to the _nolock
variants.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years agoGFS2: Move umount flush rwsem
Steven Whitehouse [Tue, 7 Apr 2009 13:01:34 +0000 (14:01 +0100)]
GFS2: Move umount flush rwsem

The rwsem, used only on umount, is in the wrong place in glock.c.
This patch moves it up a bit so that it does not get called under
a spinlock.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years agoGFS2: Fix symlink creation race
Steven Whitehouse [Tue, 31 Mar 2009 15:06:27 +0000 (16:06 +0100)]
GFS2: Fix symlink creation race

In certain cases symlinks can appear to have zero size if a lookup
on the inode occurs within a certain (very short) time after the
symlink has been created. The symlink is correctly created on disk
but appears to have zero size when stat()ed. This patch closes the
race and prevents incorrect sizes appearing.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years agoGFS2: Make quotad's waiting interruptible
Steven Whitehouse [Tue, 31 Mar 2009 14:49:08 +0000 (15:49 +0100)]
GFS2: Make quotad's waiting interruptible

So we don't count its D state in the loadavg.

Reported-by: Nathan Straz <nstraz@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years agoALSA: hda - Add quirk mask for Fujitsu Amilo laptops with ALC883
Takashi Iwai [Tue, 14 Apr 2009 12:51:04 +0000 (14:51 +0200)]
ALSA: hda - Add quirk mask for Fujitsu Amilo laptops with ALC883

Added the models for quirk bitmask 1734:110x and 1734:113x of
Fujitsu laptops.

This will fix the model detection for Amilo Xa3540.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years ago[ALSA] intel8x0: add one retry to the ac97_clock measurement routine
Jaroslav Kysela [Wed, 15 Apr 2009 08:16:24 +0000 (10:16 +0200)]
[ALSA] intel8x0: add one retry to the ac97_clock measurement routine

It seems that on some hardware platforms, the first measurement is wrong.
This patch adds second measurement to this case.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agocfq-iosched: don't delay queue kick for a merged request
Jens Axboe [Tue, 14 Apr 2009 12:18:16 +0000 (14:18 +0200)]
cfq-iosched: don't delay queue kick for a merged request

"Zhang, Yanmin" <yanmin_zhang@linux.intel.com> reports that commit
b029195dda0129b427c6e579a3bb3ae752da3a93 introduced a regression
of about 50% with sequential threaded read workloads. The test
case is:

tiotest -k0 -k1 -k3 -f 80 -t 32

which starts 32 threads each reading a 80MB file. Twiddle the kick
queue logic so that we do start IO immediately, if it appears to be
a fully merged request. We can't really detect that, so just check
if the request is bigger than a page or not. The assumption is that
since single bio issues will first queue a single request with just
one page attached and then later do merges on that, if we already
have more than a page worth of data in the request, then the request
is most likely good to go.

Verified that this doesn't cause a regression with the test case that
commit b029195dda0129b427c6e579a3bb3ae752da3a93 was fixing. It does not,
we still see maximum sized requests for the queue-then-merge cases.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agobuffer: switch do_emergency_thaw() away from pdflush_operation()
Jens Axboe [Wed, 8 Apr 2009 11:44:08 +0000 (13:44 +0200)]
buffer: switch do_emergency_thaw() away from pdflush_operation()

This is (again) a preparatory patch similar to commit
a2a9537ac0b37a5da6fbe7e1e9cb06c524d2a9c4. It open codes a simple
async way of executing do_thaw_all() out of context, so we can get
rid of pdflush.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: update biodoc.txt on plugging
Jens Axboe [Wed, 8 Apr 2009 09:38:50 +0000 (11:38 +0200)]
block: update biodoc.txt on plugging

We do per-device plugging, get rid of any references to tq_disk as that
has been dead since 2.6.5 or so.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoas-iosched: get rid of private REQ_SYNC/REQ_ASYNC defines
Jens Axboe [Wed, 8 Apr 2009 09:02:08 +0000 (11:02 +0200)]
as-iosched: get rid of private REQ_SYNC/REQ_ASYNC defines

We can just use the block layer BLK_RW_SYNC/ASYNC defines now.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agocfq-iosched: get rid of private SYNC/ASYNC defines
Jens Axboe [Wed, 8 Apr 2009 08:58:57 +0000 (10:58 +0200)]
cfq-iosched: get rid of private SYNC/ASYNC defines

We can just use the block layer BLK_RW_SYNC/ASYNC defines now.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agocfq-iosched: use rw_is_sync() to see if rw flags are sync or not
Jens Axboe [Wed, 8 Apr 2009 08:56:08 +0000 (10:56 +0200)]
cfq-iosched: use rw_is_sync() to see if rw flags are sync or not

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoDocument and move the various READ/WRITE types
Jens Axboe [Tue, 14 Apr 2009 06:19:27 +0000 (08:19 +0200)]
Document and move the various READ/WRITE types

It's a somewhat twisty maze of hints and behavioural modifiers, try
and clear it up a bit with some documentation.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: fix bad spelling of quiesce
Jens Axboe [Wed, 8 Apr 2009 12:22:01 +0000 (14:22 +0200)]
block: fix bad spelling of quiesce

Credit goes to Andrew Morton for spotting this one.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: move bio list helpers into bio.h
Christoph Hellwig [Tue, 7 Apr 2009 17:55:13 +0000 (19:55 +0200)]
block: move bio list helpers into bio.h

It's used by DM and MD and generally useful, so move the bio list
helpers into bio.h.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agopowerpc: pseries/dtl.c should include asm/firmware.h
Sachin Sant [Tue, 14 Apr 2009 14:35:55 +0000 (14:35 +0000)]
powerpc: pseries/dtl.c should include asm/firmware.h

A randconfig build on powerpc failed with:

dtl.c: In function 'dtl_init':
dtl.c:238: error: implicit declaration of function 'firmware_has_feature'
dtl.c:238: error: 'FW_FEATURE_SPLPAR' undeclared (first use in this function)

- We need firmware.h for these definitions.

Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Fix data-corrupting bug in __futex_atomic_op
Paul Mackerras [Mon, 13 Apr 2009 14:09:09 +0000 (14:09 +0000)]
powerpc: Fix data-corrupting bug in __futex_atomic_op

Richard Henderson pointed out that the powerpc __futex_atomic_op has a
bug: it will write the wrong value if the stwcx. fails and it has to
retry the lwarx/stwcx. loop, since 'oparg' will have been overwritten
by the result from the first time around the loop.  This happens
because it uses the same register for 'oparg' (an input) as it uses
for the result.

This fixes it by using separate registers for 'oparg' and 'ret'.

Cc: stable@kernel.org
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/pseries: Set error_state to pci_channel_io_normal in eeh_report_reset()
Mike Mason [Fri, 10 Apr 2009 08:57:03 +0000 (08:57 +0000)]
powerpc/pseries: Set error_state to pci_channel_io_normal in eeh_report_reset()

While adding native EEH support to Emulex and Qlogic drivers, it was
discovered that dev->error_state was set to pci_io_channel_normal too
late in the recovery process. These drivers rely on error_state to
determine if they can access the device in their slot_reset callback,
thus error_state needs to be set to pci_io_channel_normal in
eeh_report_reset(). Below is a detailed explanation (courtesy of Richard
Lary) as to why this is necessary.

Background:
PCI MMIO or DMA accesses to a frozen slot generate additional EEH
errors. If the number of additional EEH errors exceeds EEH_MAX_FAILS the
adapter will be shutdown. To avoid triggering excessive EEH errors and
an undesirable adapter shutdown, some drivers use the
pci_channel_offline(dev) wrapper function to return a Boolean value
based on the value of pci_dev->error_state to determine if PCI MMIO or
DMA accesses are safe. If the wrapper returns TRUE, drivers must not
make PCI MMIO or DMA access to their hardware.

The pci_dev structure member error_state reflects one of three values,
1) pci_channel_io_normal, 2) pci_channel_io_frozen, 3)
pci_channel_io_perm_failure.  Function pci_channel_offline(dev) returns
TRUE if error_state is pci_channel_io_frozen or pci_channel_io_perm_failure.

The EEH driver sets pci_dev->error_state to pci_channel_io_frozen at the
point where the PCI slot is frozen. Currently, the EEH driver restores
dev->error_state to pci_channel_io_normal in eeh_report_resume() before
calling the driver's resume callback. However, when the EEH driver calls
the driver's slot_reset callback() from eeh_report_reset(), it
incorrectly indicates the error state is still pci_channel_io_frozen.

Waiting until eeh_report_resume() to restore dev->error_state to
pci_channel_io_normal is too late for Emulex and QLogic FC drivers and
any other drivers which are designed to use common code paths in these
two cases: i) those called after the driver's slot_reset callback() and
ii) those called after the PCI slot is frozen but before the driver's
slot_reset callback is called. Case i) all driver paths executed to
reinitialize the hardware after a reset and case ii) all code paths
executed by driver kernel threads that run asynchronous to the main
driver thread, such as interrupt handlers and worker threads to process
driver work queues.

Emulex and QLogic FC drivers are designed with common code paths which
require that pci_channel_offline(dev) reflect the true state of the
hardware. The state transitions that the hardware takes from Normal
Operations to Slot Frozen to Reset to Normal Operations are documented
in the Power Architectureâ„¢ Platform Requirements+ (PAPR+) in Table 75.
PE State Control.

PAPR defines the following 3 states:

0 -- Not reset, Not EEH stopped, MMIO load/store allowed, DMA allowed
     (Normal Operations)
1 -- Reset, Not EEH stopped, MMIO load/store disabled, DMA disabled
2 -- Not reset, EEH stopped, MMIO load/store disabled, DMA disabled
     (Slot Frozen)

An EEH error places the slot in state 2 (Frozen) and the adapter driver
is notified that an EEH error was detected. If the adapter driver
returns PCI_ERS_RESULT_NEED_RESET, the EEH driver calls
eeh_reset_device() to place the slot into state 1 (Reset) and
eeh_reset_device completes by placing the slot into State 0 (Normal
Operations). Upon return from eeh_reset_device(), the EEH driver calls
eeh_report_reset, which then calls the adapter's slot_reset callback. At
the time the adapter's slot_reset callback is called, the true state of
the hardware is Normal Operations and should be accurately reflected by
setting dev->error_state to pci_channel_io_normal.

The current implementation of EEH driver does not do so and requires
this change to correct this deficiency.

Signed-off-by: Mike Mason <mmlnx@us.ibm.com>
Acked-by: Linas Vepstas <linasvepstas@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Allow 256kB pages with SHMEM
Hugh Dickins [Mon, 6 Apr 2009 11:01:15 +0000 (11:01 +0000)]
powerpc: Allow 256kB pages with SHMEM

Now that shmem's divisions by zero and SHMEM_MAX_BYTES are fixed,
let powerpc 256kB pages coexist with CONFIG_SHMEM again.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoLinux 2.6.30-rc2 v2.6.30-rc2
Linus Torvalds [Tue, 14 Apr 2009 20:51:48 +0000 (13:51 -0700)]
Linux 2.6.30-rc2

15 years ago[ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine
Jaroslav Kysela [Tue, 14 Apr 2009 20:40:04 +0000 (22:40 +0200)]
[ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine

Also add a little code cleanup.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoMerge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt...
Linus Torvalds [Tue, 14 Apr 2009 20:16:40 +0000 (13:16 -0700)]
Merge branch 'drm-intel-next' of git://git./linux/kernel/git/anholt/drm-intel

* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
  drm/i915: fix scheduling while holding the new active list spinlock
  drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.
  drm/i915: Correctly set the write flag for get_user_pages in pread.
  drm/i915: Fix use of uninitialized var in 40a5f0de
  drm/i915: indicate framebuffer restore key in SysRq help message
  drm/i915: sync hdmi detection by hdmi identifier with 2D
  drm/i915: Fix a mismerge of the IGD patch (new .find_pll hooks missed)
  drm/i915: Implement batch and ring buffer dumping

15 years agox86 microcode: revert some work_on_cpu
Hugh Dickins [Tue, 14 Apr 2009 18:25:42 +0000 (19:25 +0100)]
x86 microcode: revert some work_on_cpu

Revert part of af5c820a3169e81af869c113e18ec7588836cd50 ("x86: cpumask:
use work_on_cpu in arch/x86/kernel/microcode_core.c")

That change is causing only one Intel CPU's microcode to be updated e.g.
microcode: CPU3 updated from revision 0x9 to 0x17, date = 2005-04-22
where before it announced that also for CPU0 and CPU1 and CPU2.

We cannot use work_on_cpu() in the CONFIG_MICROCODE_OLD_INTERFACE code,
because Intel's request_microcode_user() involves a copy_from_user() from
/sbin/microcode_ctl, which therefore needs to be on that CPU at the time.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrm/i915: fix scheduling while holding the new active list spinlock
Shaohua Li [Wed, 8 Apr 2009 02:58:23 +0000 (10:58 +0800)]
drm/i915: fix scheduling while holding the new active list spinlock

regression caused by commit 5e118f4139feafe97e913df67b1f7c1e5083e535:
i915_gem_object_move_to_inactive() should be called in task context,
as it calls fput();

Signed-off-by: Shaohua Li<shaohua.li@intel.com>
[anholt: Add more detail to the comment about the lock break that's added]
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 14 Apr 2009 17:12:31 +0000 (10:12 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./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:
  lockdep: warn about lockdep disabling after kernel taint, fix

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
Linus Torvalds [Tue, 14 Apr 2009 17:12:07 +0000 (10:12 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mszeredi/fuse

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: fix "direct_io" private mmap
  fuse: fix argument type in fuse_get_user_pages()

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Tue, 14 Apr 2009 17:10:53 +0000 (10:10 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: fix possible mismatch of sufile counters on recovery
  nilfs2: segment usage file cleanups
  nilfs2: fix wrong accounting and duplicate brelse in nilfs_sufile_set_error
  nilfs2: simplify handling of active state of segments fix
  nilfs2: remove module version
  nilfs2: fix lockdep recursive locking warning on meta data files
  nilfs2: fix lockdep recursive locking warning on bmap
  nilfs2: return f_fsid for statfs2

15 years agoMerge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Tue, 14 Apr 2009 17:10:16 +0000 (10:10 -0700)]
Merge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Add missing FILE tag to MAINTAINERS
  microblaze: remove duplicated #include's
  microblaze: struct device - replace bus_id with dev_name()
  microblaze: Simplify copy_thread()
  microblaze: Add TIMESTAMPING constants to socket.h
  microblaze: Add missing empty ftrace.h file
  microblaze: Fix problem with removing zero length files

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Tue, 14 Apr 2009 17:00:42 +0000 (10:00 -0700)]
Merge git://git./linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Add in PCI bus for DMA API debugging.
  sh: Pre-allocate a reasonable number of DMA debug entries.
  sh: sh7786: modify usb setup timeout judgment bug.
  MAINTAINERS: Update sh architecture file patterns.
  sh: ap325: use edge control for ov772x camera
  sh: Plug in support for ARCH=sh64 using sh SRCARCH.
  sh: urquell: Fix up address mapping in board comments.
  sh: Add support for DMA API debugging.
  sh: Provide cpumask_of_pcibus() to fix NUMA build.
  sh: urquell: Add board comment
  sh: wire up sys_preadv/sys_pwritev() syscalls.
  sh: sh7785lcr: fix PCI address map for 32-bit mode
  sh: intc: Added resume from hibernation support to the intc

15 years agoFix lpfc_parse_bg_err()'s use of do_div()
David Howells [Tue, 14 Apr 2009 16:08:34 +0000 (17:08 +0100)]
Fix lpfc_parse_bg_err()'s use of do_div()

Fix lpfc_parse_bg_err()'s use of do_div().  It should be passing a 64-bit
variable as the first parameter.  However, since it's only using a 32-bit
variable, it doesn't need to use do_div() at all, but can instead use the
division operator.

This deals with the following warnings:

    CC      drivers/scsi/lpfc/lpfc_scsi.o
  drivers/scsi/lpfc/lpfc_scsi.c: In function 'lpfc_parse_bg_err':
  drivers/scsi/lpfc/lpfc_scsi.c:1397: warning: comparison of distinct pointer types lacks a cast
  drivers/scsi/lpfc/lpfc_scsi.c:1397: warning: right shift count >= width of type
  drivers/scsi/lpfc/lpfc_scsi.c:1397: warning: passing argument 1 of '__div64_32' from incompatible pointer type

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Update some of the USB kernel doc
Leandro Dorileo [Tue, 14 Apr 2009 13:59:51 +0000 (14:59 +0100)]
tty: Update some of the USB kernel doc

Updates some usb_serial_port members documentation.

Signed-off-by: Leandro Dorileo <ldorileo@gmail.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoparport_pc: Fix build failure drivers/parport/parport_pc.c for powerpc
Tony Breeds [Tue, 14 Apr 2009 13:58:41 +0000 (14:58 +0100)]
parport_pc: Fix build failure drivers/parport/parport_pc.c for powerpc

In commit 51dcdfec6a274afc1c6fce180d582add9ff512c0 ("parport: Use the
PCI IRQ if offered") parport_pc_probe_port() gained an irqflags arg.
This isn't being supplied on powerpc.  This patch make powerpc fallback
to the old behaviour, that is using "0" for irqflags.

Fixes build failure:

  In file included from drivers/parport/parport_pc.c:68:
  arch/powerpc/include/asm/parport.h: In function 'parport_pc_find_nonpci_ports':
  arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port'
  arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port'
  arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port'
  make[3]: *** [drivers/parport/parport_pc.o] Error 1

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoparport: Fix various uses of parport_pc
Alan Cox [Tue, 14 Apr 2009 13:58:23 +0000 (14:58 +0100)]
parport: Fix various uses of parport_pc

These got overlooked first time around.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Fix leak in ti-usb
Alan Cox [Tue, 14 Apr 2009 13:58:11 +0000 (14:58 +0100)]
tty: Fix leak in ti-usb

If the ti-usb adapter returns an zero data length frame (which happens)
then we leak a kref.  Found by Christoph Mair <christoph.mair@gmail.com>
who proposed a patch.  The patch here is different as Christoph's patch
didn't work for the case where tty = NULL and data arrived but Christoph
did all the hard work chasing it down.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocdc-acm: Fix long standing abuse of tty->low_latency
Alan Cox [Tue, 14 Apr 2009 13:57:36 +0000 (14:57 +0100)]
cdc-acm: Fix long standing abuse of tty->low_latency

ACM sets the low latency flag but calls the flip buffer routines from
IRQ context which isn't permitted (and as of 2.6.29 causes a warning
hence this one was caught)

Fortunatelt ACM doesn't need to set this flag in the first place as it
only set it to work around problems in ancient (pre tty flip rewrite)
kernels.

Reported-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoALSA: hda - Avoid call of snd_jack_report at release
Takashi Iwai [Tue, 14 Apr 2009 14:15:29 +0000 (16:15 +0200)]
ALSA: hda - Avoid call of snd_jack_report at release

Don't call snd_jack_report at release of sigmatel and conexnat codecs
which results in Oops at unloading the module.

The Oops is triggered by the power-up sequence during the free due to
the pincfg restoration.  Since the power-up sequence is involved with
the unsol handling, the jack reporting may be issued during that.
The Oops occurs with this jack reporting because the jack instances
have been already released but the codec doesn't do the proper
book-keeping.

This patch adds the book-keeping of jack instances to avoid the access
to bogus pointers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: add private_data to struct snd_jack
Takashi Iwai [Tue, 14 Apr 2009 14:13:58 +0000 (16:13 +0200)]
ALSA: add private_data to struct snd_jack

Added private_data and private_free fields to struct snd_jack so that
the caller can assign the data.  It'll be helpful for avoiding the
double-free of the jack instance.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: snd-usb-caiaq: rename files to remove redundant information in file pathes
Daniel Mack [Wed, 1 Apr 2009 17:05:39 +0000 (19:05 +0200)]
ALSA: snd-usb-caiaq: rename files to remove redundant information in file pathes

Cleanup only, no functional change.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: snd-usb-caiaq: clean up header includes
Daniel Mack [Sat, 28 Mar 2009 20:19:49 +0000 (21:19 +0100)]
ALSA: snd-usb-caiaq: clean up header includes

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: sound/pci: use memdup_user()
Li Zefan [Fri, 10 Apr 2009 01:44:31 +0000 (09:44 +0800)]
ALSA: sound/pci: use memdup_user()

Remove open-coded memdup_user().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: sound/usb: use memdup_user()
Li Zefan [Fri, 10 Apr 2009 01:43:59 +0000 (09:43 +0800)]
ALSA: sound/usb: use memdup_user()

Remove open-coded memdup_user().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: sound/isa: use memdup_user()
Li Zefan [Fri, 10 Apr 2009 01:43:36 +0000 (09:43 +0800)]
ALSA: sound/isa: use memdup_user()

Remove open-coded memdup_user().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: sound/core: use memdup_user()
Li Zefan [Fri, 10 Apr 2009 01:43:08 +0000 (09:43 +0800)]
ALSA: sound/core: use memdup_user()

Remove open-coded memdup_user().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Tue, 14 Apr 2009 09:48:25 +0000 (11:48 +0200)]
Merge branch 'for-2.6.30' of git://git./linux/kernel/git/broonie/sound-2.6 into topic/asoc

15 years agomicroblaze: Add missing FILE tag to MAINTAINERS
Michal Simek [Tue, 14 Apr 2009 09:38:57 +0000 (11:38 +0200)]
microblaze: Add missing FILE tag to MAINTAINERS

Signed-off-by: Michal Simek <monstr@monstr.eu>
15 years agolockdep: warn about lockdep disabling after kernel taint, fix
Ingo Molnar [Tue, 14 Apr 2009 09:03:12 +0000 (11:03 +0200)]
lockdep: warn about lockdep disabling after kernel taint, fix

Impact: build fix for Sparc and s390

Stephen Rothwell reported that the Sparc build broke:

 In file included from kernel/panic.c:12:
 include/linux/debug_locks.h: In function '__debug_locks_off':
 include/linux/debug_locks.h:15: error: implicit declaration of function 'xchg'

due to:

 9eeba61: lockdep: warn about lockdep disabling after kernel taint

There is some inconsistency between architectures about where exactly
xchg() is defined.

The traditional place is in system.h but the more logical point for it
is in atomic.h - where most architectures (especially new ones) have
it defined. These architecture also still offer it via system.h.

Some, such as Sparc or s390 only have it in asm/system.h and not available
via asm/atomic.h at all.

Use the widest set of headers in debug_locks.h and also include asm/system.h.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20090414144317.026498df.sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agomicroblaze: remove duplicated #include's
Huang Weiyi [Mon, 13 Apr 2009 22:56:15 +0000 (06:56 +0800)]
microblaze: remove duplicated #include's

Remove duplicated #include's in
  arch/microblaze/include/asm/io.h
  arch/microblaze/kernel/prom.c
  arch/microblaze/kernel/ptrace.c
  arch/microblaze/kernel/signal.c
  arch/microblaze/kernel/sys_microblaze.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
15 years agomicroblaze: struct device - replace bus_id with dev_name()
Michal Simek [Tue, 14 Apr 2009 07:38:06 +0000 (09:38 +0200)]
microblaze: struct device - replace bus_id with dev_name()

Signed-off-by: Michal Simek <monstr@monstr.eu>
15 years agomicroblaze: Simplify copy_thread()
Michal Simek [Tue, 14 Apr 2009 07:18:19 +0000 (09:18 +0200)]
microblaze: Simplify copy_thread()

Removing nr parameter from copy_tread function
commit 6f2c55b843836d26528c56a0968689accaedbc67

Signed-off-by: Michal Simek <monstr@monstr.eu>
15 years agomicroblaze: Add TIMESTAMPING constants to socket.h
Michal Simek [Tue, 14 Apr 2009 07:16:01 +0000 (09:16 +0200)]
microblaze: Add TIMESTAMPING constants to socket.h

This changes was introduce with
commit: cb9eff097831007afb30d64373f29d99825d0068

net: new user space API for time stamping of incoming and outgoing packets

Signed-off-by: Michal Simek <monstr@monstr.eu>
15 years agomicroblaze: Add missing empty ftrace.h file
Michal Simek [Tue, 14 Apr 2009 06:37:30 +0000 (08:37 +0200)]
microblaze: Add missing empty ftrace.h file

Signed-off-by: Michal Simek <monstr@monstr.eu>
15 years agomicroblaze: Fix problem with removing zero length files
Michal Simek [Mon, 13 Apr 2009 18:51:22 +0000 (20:51 +0200)]
microblaze: Fix problem with removing zero length files

Adding one new line was recommended solution.
Test with make distclean

Tested-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
15 years agosh: Add in PCI bus for DMA API debugging.
Paul Mundt [Tue, 14 Apr 2009 06:23:40 +0000 (15:23 +0900)]
sh: Add in PCI bus for DMA API debugging.

This adds in the pci_bus_type for DMA API debug.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Pre-allocate a reasonable number of DMA debug entries.
Paul Mundt [Tue, 14 Apr 2009 06:22:15 +0000 (15:22 +0900)]
sh: Pre-allocate a reasonable number of DMA debug entries.

This prevents the DMA API debugging from running out of entries right
away on boot. Defines 4096 entries by default, which while a bit on the
heavy side, ought to leave enough breathing room for some time.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Tue, 14 Apr 2009 01:16:09 +0000 (18:16 -0700)]
Merge branch 'for-linus' of git://git./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:
  tomoyo: version bump to 2.2.0.
  tomoyo: add Documentation/tomoyo.txt

15 years agoFix quilt merge error in acpi-cpufreq.c
Linus Torvalds [Tue, 14 Apr 2009 01:09:20 +0000 (18:09 -0700)]
Fix quilt merge error in acpi-cpufreq.c

We ended up incorrectly using '&cur' instead of '&readin' in the
work_on_cpu() -> smp_call_function_single() transformation in commit
01599fca6758d2cd133e78f87426fc851c9ea725 ("cpufreq: use
smp_call_function_[single|many]() in acpi-cpufreq.c").

Andrew explains:
 "OK, the acpi tree went and had conflicting changes merged into it after
  I'd written the patch and it appears that I incorrectly reverted part
  of 18b2646fe3babeb40b34a0c1751e0bf5adfdc64c while fixing the resulting
  rejects.

  Switching it to `readin' looks correct."

Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotomoyo: version bump to 2.2.0.
Tetsuo Handa [Wed, 8 Apr 2009 13:31:28 +0000 (22:31 +0900)]
tomoyo: version bump to 2.2.0.

Signed-off-by: Kentaro Takeda <takedakn@nttdata.co.jp>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Toshiharu Harada <haradats@nttdata.co.jp>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agotomoyo: add Documentation/tomoyo.txt
Tetsuo Handa [Mon, 13 Apr 2009 02:04:19 +0000 (11:04 +0900)]
tomoyo: add Documentation/tomoyo.txt

Signed-off-by: Kentaro Takeda <takedakn@nttdata.co.jp>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Toshiharu Harada <haradats@nttdata.co.jp>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agoMerge branch 'for-rc1/xen/core' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 13 Apr 2009 22:30:20 +0000 (15:30 -0700)]
Merge branch 'for-rc1/xen/core' of git://git./linux/kernel/git/jeremy/xen

* 'for-rc1/xen/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen: add FIX_TEXT_POKE to fixmap
  xen: honour VCPU availability on boot
  xen: clean up gate trap/interrupt constants
  xen: set _PAGE_NX in __supported_pte_mask before pagetable construction
  xen: resume interrupts before system devices.
  xen/mmu: weaken flush_tlb_other test
  xen/mmu: some early pagetable cleanups
  Xen: Add virt_to_pfn helper function
  x86-64: remove PGE from must-have feature list
  xen: mask XSAVE from cpuid
  NULL noise: arch/x86/xen/smp.c
  xen: remove xen_load_gdt debug
  xen: make xen_load_gdt simpler
  xen: clean up xen_load_gdt
  xen: split construction of p2m mfn tables from registration
  xen: separate p2m allocation from setting
  xen: disable preempt for leave_lazy_mmu

15 years agosh: sh7786: modify usb setup timeout judgment bug.
Kuninori Morimoto [Fri, 10 Apr 2009 00:54:07 +0000 (00:54 +0000)]
sh: sh7786: modify usb setup timeout judgment bug.

This corrects a race with the PHY RST bit not being set properly if the
PLL status changes right before timeout. This resulted in it potentially
failing even if the device came up in time.

Special thanks to Mr. Juha Leppanen and Iwamatsu-san for reporting this
out and reviewing it.

Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Tested-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoedac: use to_delayed_work()
Jean Delvare [Mon, 13 Apr 2009 21:40:21 +0000 (14:40 -0700)]
edac: use to_delayed_work()

The edac-core driver includes code which assumes that the work_struct
which is included in every delayed_work is the first member of that
structure.  This is currently the case but might change in the future, so
use to_delayed_work() instead, which doesn't make such an assumption.

linux-2.6.30-rc1 has the to_delayed_work() function that will allow this
patch to work

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoedac: fix local pci_write_bits32
Jeff Haran [Mon, 13 Apr 2009 21:40:20 +0000 (14:40 -0700)]
edac: fix local pci_write_bits32

Fix the edac local pci_write_bits32 to properly note the 'escape' mask if
all ones in a 32-bit word.

Currently no consumer of this function uses that mask, so there is no
danger to existing code.

Signed-off-by: Jeff Haran <jharan@Brocade.COM>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosgi-xpc: clean up numerous globals
Robin Holt [Mon, 13 Apr 2009 21:40:19 +0000 (14:40 -0700)]
sgi-xpc: clean up numerous globals

Introduce xpc_arch_ops and eliminate numerous individual global definitions.

Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Dean Nelson <dcn@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosgi-xpc: implement opencomplete messaging
Robin Holt [Mon, 13 Apr 2009 21:40:19 +0000 (14:40 -0700)]
sgi-xpc: implement opencomplete messaging

sgi-xpc has a window of failure where an open message can be sent and a
subsequent data message can get lost.  We have added a new message
(opencomplete) which closes that window.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosgi-xpc: prevent false heartbeat failures
Robin Holt [Mon, 13 Apr 2009 21:40:18 +0000 (14:40 -0700)]
sgi-xpc: prevent false heartbeat failures

The heartbeat timeout functionality in sgi-xpc is currently not trained to
the connection time.  If a connection is made and the code is in the last
polling window prior to doing a timeout, the next polling window will see
the heartbeat as unchanged and initiate a no-heartbeat disconnect.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosgi-xpc: update SGI XP/XPC/XPNET maintainer
Robin Holt [Mon, 13 Apr 2009 21:40:17 +0000 (14:40 -0700)]
sgi-xpc: update SGI XP/XPC/XPNET maintainer

Dean has moved on to other work.  His responsibilities for XP/XPC/XPNET
have been handed to me.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodoc: use correct debugfs mountpoint
Shen Feng [Mon, 13 Apr 2009 21:40:16 +0000 (14:40 -0700)]
doc: use correct debugfs mountpoint

Use the default mountpoint of debugfs in the pktcdvd ABI.

Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
Cc: <balagi@justmail.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomemcg: fix documentation
Bharata B Rao [Mon, 13 Apr 2009 21:40:15 +0000 (14:40 -0700)]
memcg: fix documentation

The description about various statistics from memory.stat is not accurate
and confusing at times.

Correct this along with a few other minor cleanups.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoReplace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n)
Yang Hongyang [Mon, 13 Apr 2009 21:40:14 +0000 (14:40 -0700)]
Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n)

This is the second go through of the old DMA_nBIT_MASK macro,and there're not
so many of them left,so I put them into one patch.I hope this is the last round.
After this the definition of the old DMA_nBIT_MASK macro could be removed.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Greg KH <greg@kroah.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoext2: fix data corruption for racing writes
Jan Kara [Mon, 13 Apr 2009 21:40:14 +0000 (14:40 -0700)]
ext2: fix data corruption for racing writes

If two writers allocating blocks to file race with each other (e.g.
because writepages races with ordinary write or two writepages race with
each other), ext2_getblock() can be called on the same inode in parallel.
Before we are going to allocate new blocks, we have to recheck the block
chain we have obtained so far without holding truncate_mutex.  Otherwise
we could overwrite the indirect block pointer set by the other writer
leading to data loss.

The below test program by Ying is able to reproduce the data loss with ext2
on in BRD in a few minutes if the machine is under memory pressure:

long kMemSize  = 50 << 20;
int kPageSize = 4096;

int main(int argc, char **argv) {
int status;
int count = 0;
int i;
char *fname = "/mnt/test.mmap";
char *mem;
unlink(fname);
int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0600);
status = ftruncate(fd, kMemSize);
mem = mmap(0, kMemSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
// Fill the memory with 1s.
memset(mem, 1, kMemSize);
sleep(2);
for (i = 0; i < kMemSize; i++) {
int byte_good = mem[i] != 0;
if (!byte_good && ((i % kPageSize) == 0)) {
//printf("%d ", i / kPageSize);
count++;
}
}
munmap(mem, kMemSize);
close(fd);
unlink(fname);

if (count > 0) {
printf("Running %d bad page\n", count);
return 1;
}
return 0;
}

Cc: Ying Han <yinghan@google.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Mingming Cao <cmm@us.ibm.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoshmem: respect MAX_LFS_FILESIZE
Hugh Dickins [Mon, 13 Apr 2009 21:40:12 +0000 (14:40 -0700)]
shmem: respect MAX_LFS_FILESIZE

SHMEM_MAX_BYTES was derived from the maximum size of its triple-indirect
swap vector, forgetting to take the MAX_LFS_FILESIZE limit into account.
Never mind 256kB pages, even 8kB pages on 32-bit kernels allowed files to
grow slightly bigger than that supposed maximum.

Fix this by using the min of both (at build time not run time).  And it
happens that this calculation is good as far as 8MB pages on 32-bit or
16MB pages on 64-bit: though SHMSWP_MAX_INDEX gets truncated before that,
it's truncated to such large numbers that we don't need to care.

[akpm@linux-foundation.org: it needs pagemap.h]
[akpm@linux-foundation.org: fix sparc64 min() warnings]
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Yuri Tikhonov <yur@emcraft.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoshmem: fix division by zero
Yuri Tikhonov [Mon, 13 Apr 2009 21:40:11 +0000 (14:40 -0700)]
shmem: fix division by zero

Fix a division by zero which we have in shmem_truncate_range() and
shmem_unuse_inode() when using big PAGE_SIZE values (e.g.  256kB on
ppc44x).

With 256kB PAGE_SIZE, the ENTRIES_PER_PAGEPAGE constant becomes too large
(0x1.0000.0000) on a 32-bit kernel, so this patch just changes its type
from 'unsigned long' to 'unsigned long long'.

Hugh: reverted its unsigned long longs in shmem_truncate_range() and
shmem_getpage(): the pagecache index cannot be more than an unsigned long,
so the divisions by zero occurred in unreached code.  It's a pity we need
any ULL arithmetic here, but I found no pretty way to avoid it.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agointelfb: support i854
Stefan Husemann [Mon, 13 Apr 2009 21:40:10 +0000 (14:40 -0700)]
intelfb: support i854

Support the Intel 854 Chipset in fbdev.

We test and use the patch on a Thomson IP1101 IPTV-Box.  On the VGA-Port
we get a normal signal.

Here is the link to the Mambux-Project: http://www.mambux.de

Cc: Keith Packard <keithp@keithp.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Stefan Husemann <shusemann@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: add documentation describing what tsk->active_mm means vs tsk->mm
Michael Ellerman [Mon, 13 Apr 2009 21:40:09 +0000 (14:40 -0700)]
mm: add documentation describing what tsk->active_mm means vs tsk->mm

I'm sure everyone knows this, but I didn't, so I googled it, and found a
nice explanation from Linus.  Might be worth sticking in Documentation.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomemcg: remove warning when CONFIG_DEBUG_VM=n
KAMEZAWA Hiroyuki [Mon, 13 Apr 2009 21:40:08 +0000 (14:40 -0700)]
memcg: remove warning when CONFIG_DEBUG_VM=n

mm/memcontrol.c:318: warning: `mem_cgroup_is_obsolete' defined but not used

[akpm@linux-foundation.org: simplify as suggested by Balbir]
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokernel/sys.c: clean up sys_shutdown exit path
Andi Kleen [Mon, 13 Apr 2009 21:40:08 +0000 (14:40 -0700)]
kernel/sys.c: clean up sys_shutdown exit path

Impact: cleanup, fix

Clean up sys_shutdown() exit path.  Factor out common code.  Return
correct error code instead of always 0 on failure.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoat25: make input buffers of at25_*write() const
Geert Uytterhoeven [Mon, 13 Apr 2009 21:40:07 +0000 (14:40 -0700)]
at25: make input buffers of at25_*write() const

| drivers/misc/eeprom/at25.c:358: warning: assignment from incompatible pointer type

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoat24: make input buffers of at24_*write() const
Geert Uytterhoeven [Mon, 13 Apr 2009 21:40:06 +0000 (14:40 -0700)]
at24: make input buffers of at24_*write() const

| drivers/misc/eeprom/at24.c:508: warning: assignment from incompatible pointer type

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojbd: update locking coments
Jan Kara [Mon, 13 Apr 2009 21:40:06 +0000 (14:40 -0700)]
jbd: update locking coments

Update information about locking in JBD revoke code.

Reported-by: Lin Tan <tammy000@gmail.com>.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: document get_user_pages_fast()
Andy Grover [Mon, 13 Apr 2009 21:40:05 +0000 (14:40 -0700)]
mm: document get_user_pages_fast()

While better than get_user_pages(), the usage of gupf(), especially the
return values and the fact that it can potentially only partially pin the
range, warranted some documentation.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoinitramfs: fix initramfs to work with hardlinked init
Randy Robertson [Mon, 13 Apr 2009 21:40:04 +0000 (14:40 -0700)]
initramfs: fix initramfs to work with hardlinked init

Change cb6ff208076b5f434db1b8c983429269d719cef5 ("NOMMU: Support XIP on
initramfs") seems to have broken booting from initramfs with /sbin/init
being a hardlink.

It seems like the logic required for XIP on nommu, i.e.  ftruncate to
reported cpio header file size (body_len) is broken for hardlinks, which
have a reported size of 0, and the truncate thus nukes the contents of the
file (in my case busybox), making boot impossible and ending with runaway
loop modprobe binfmt-0000 - and of course 0000 is not a valid binary
format.

My fix is to only call ftruncate if size is non-zero which fixes things
for me, but I'm not certain whether this will break XIP for those files on
nommu systems, although I would guess not.

Signed-off-by: Randy Robertson <rmrobert@vmware.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoptrace: fix exit_ptrace() vs ptrace_traceme() race
Oleg Nesterov [Mon, 13 Apr 2009 21:40:03 +0000 (14:40 -0700)]
ptrace: fix exit_ptrace() vs ptrace_traceme() race

Pointed out by Roland.  The bug was recently introduced by me in
"forget_original_parent: split out the un-ptrace part", commit
39c626ae47c469abdfd30c6e42eff884931380d6.

Since that patch we have a window after exit_ptrace() drops tasklist and
before forget_original_parent() takes it again.  In this window the child
can do ptrace(PTRACE_TRACEME) and nobody can untrace this child after
that.

Change ptrace_traceme() to not attach to the exiting ->real_parent.  We
don't report the error in this case, we pretend we attach right before
->real_parent calls exit_ptrace() which should untrace us anyway.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMAINTAINERS: bluesmoke-devel list is moderated for non-subscribers
Jean Delvare [Mon, 13 Apr 2009 21:40:02 +0000 (14:40 -0700)]
MAINTAINERS: bluesmoke-devel list is moderated for non-subscribers

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: reformat the Unevictable-LRU documentation
David Howells [Mon, 13 Apr 2009 21:40:01 +0000 (14:40 -0700)]
mm: reformat the Unevictable-LRU documentation

Do a bit of reformatting on the Unevictable-LRU documentation.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>