platform/kernel/linux-rpi.git
15 years agoMerge branch 'for-2.6.30' into for-2.6.31
Mark Brown [Tue, 5 May 2009 09:13:01 +0000 (10:13 +0100)]
Merge branch 'for-2.6.30' into for-2.6.31

15 years agoMerge commit 'takashi/topic/asoc' into for-2.6.31
Mark Brown [Tue, 5 May 2009 09:12:55 +0000 (10:12 +0100)]
Merge commit 'takashi/topic/asoc' into for-2.6.31

15 years agoASoC: TWL4030: Add VIBRA output
Peter Ujfalusi [Tue, 5 May 2009 05:55:47 +0000 (08:55 +0300)]
ASoC: TWL4030: Add VIBRA output

This patch adds support for the VIBRA output on TWL4030 codec.
The VIBRA output can be driven with audio data or with
local vibrator driver.
Add the needed DAPM elements and routes for the VIBRA output and
controls for the VIBRA driver configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: IMote2 ASoC Support
Jonathan Cameron [Mon, 4 May 2009 14:54:11 +0000 (14:54 +0000)]
ASoC: IMote2 ASoC Support

This patch adds the ASoC side of the board support for the Crossbow
IMB400 daughter board.

Thanks to Crossbow for considerable assistance.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: TWL4030: Add voice digital loopback: sidetone
Lopez Cruz, Misael [Fri, 1 May 2009 02:48:08 +0000 (21:48 -0500)]
ASoC: TWL4030: Add voice digital loopback: sidetone

This patch add voice digital loopback (sidetone) to the twl4030
driver. It mixes voice uplink attenuated (by sidetone gain) with
voice downlink when the codec is working in option2 (voice/audio
mode).

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: TWL4030: Add VDL analog bypass
Lopez Cruz, Misael [Fri, 1 May 2009 02:47:22 +0000 (21:47 -0500)]
ASoC: TWL4030: Add VDL analog bypass

This patch adds voice downlink analog bypass switch. It follows
the same approach as in other analog bypass switches.
DAC switch is moved from 'DAC Voice' to 'Analog Voice Playback Mixer',
that will also allow voice DAC to be powered in digital voice
loopback (sidetone).

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix errors in WM8990
Jinyoung Park [Fri, 1 May 2009 11:54:31 +0000 (12:54 +0100)]
ASoC: Fix errors in WM8990

The mis-typing exist in dapm controller definitions and dapm route definitions,
so happen mis-matched error when snd_soc_dapm_add_routes().

Cc: stable@kernel.org
Signed-off-by: Jinyoung Park <parkjy@mtekvision.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com
15 years agoMerge branch 'fix/asoc' into topic/asoc
Takashi Iwai [Mon, 4 May 2009 14:05:23 +0000 (16:05 +0200)]
Merge branch 'fix/asoc' into topic/asoc

15 years agoASoC: Remove BROKEN from mpc5200 kconfig
Takashi Iwai [Mon, 4 May 2009 14:03:21 +0000 (16:03 +0200)]
ASoC: Remove BROKEN from mpc5200 kconfig

The regression was fixed by commit
3e5b50165fd0be080044586f43fcdd460ed27610, so no need to mark this
driver as BROKEN.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/pcm-jiffies-check' into fix/asoc
Takashi Iwai [Mon, 4 May 2009 14:00:16 +0000 (16:00 +0200)]
Merge branch 'fix/pcm-jiffies-check' into fix/asoc

15 years agoASoC: Remove unused DAI format defines
Mark Brown [Sat, 2 May 2009 11:28:25 +0000 (12:28 +0100)]
ASoC: Remove unused DAI format defines

The defines for TDM and synchronous clocks are not used - they are
mostly a legacy of the automatic clocking configuration.  TDM will
require configuration of the number of timeslots and which ones to use
so can't be fit into the DAI format and synchronous mode is handled by
symmetric_rates (and needs to be done by constraints rather than when
the DAI format is being configured).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Use a shared define for AC97 CODEC data formats
Mark Brown [Sat, 2 May 2009 11:24:55 +0000 (12:24 +0100)]
ASoC: Use a shared define for AC97 CODEC data formats

The AC97 wire format is completely fixed so CODECs don't have any choice
about the formats they accept but controllers accept a variety of data
formats and render them down onto the bus.  Have a shared define so all
the CODEC drivers will interoperate with any of our controller drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Use platform device resource for S3C64xx IISv2
Mark Brown [Thu, 30 Apr 2009 12:42:04 +0000 (13:42 +0100)]
ASoC: Use platform device resource for S3C64xx IISv2

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Staticise txctrl and rxctrl for S3C IISv2
Mark Brown [Thu, 30 Apr 2009 12:21:52 +0000 (13:21 +0100)]
ASoC: Staticise txctrl and rxctrl for S3C IISv2

They aren't used by anything external and aren't prototyped; if any
users appear they can be exported again for them.

Also report what modes we have a problem with when we encounter invalid
mode configurations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Display S3C IISv2 mode and MS errors by default
Mark Brown [Thu, 30 Apr 2009 12:14:38 +0000 (13:14 +0100)]
ASoC: Display S3C IISv2 mode and MS errors by default

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Display the clock rate used as the basis for rate calculation
Mark Brown [Thu, 30 Apr 2009 12:13:55 +0000 (13:13 +0100)]
ASoC: Display the clock rate used as the basis for rate calculation

Aids debugging.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Allow use of resource from the platform device for S3C IISv2
Mark Brown [Thu, 30 Apr 2009 12:09:33 +0000 (13:09 +0100)]
ASoC: Allow use of resource from the platform device for S3C IISv2

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix boot warnings from S3C IISv2
Mark Brown [Thu, 30 Apr 2009 12:13:14 +0000 (13:13 +0100)]
ASoC: Fix boot warnings from S3C IISv2

On startup we try to make sure that the port is quiesced but if the
port is already stopped then this will generate a warning about the
RX/TX mode configuration. Configure the mode before doing the teardown
to suppress these warnings.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix data format configuration for S3C64xx IISv2 and add 24 bit
Mark Brown [Wed, 29 Apr 2009 19:29:25 +0000 (20:29 +0100)]
ASoC: Fix data format configuration for S3C64xx IISv2 and add 24 bit

The data format configuration for S3C64xx IISv2 is completely different
to that for S3C24xx. Instead of a single bit configuration in bit 0 of
IISMOD we have format selection in bits 13 and 14 and bit clock rate
selection in bits 1 and 2. While we're here add support for 24 bit
samples in S3C64xx.

At some point it may be desirable to expose the bit clock rate selection
to users but given the limited configuration options that may not be
required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Make S3C64xx clock export function to return struct clk
Mark Brown [Wed, 29 Apr 2009 19:30:39 +0000 (20:30 +0100)]
ASoC: Make S3C64xx clock export function to return struct clk

This makes the interface usable with the s3c-iis-v2 rate calculator
and consistent with S3C2412.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Check for supported CPUs when building s3c-i2s-v2
Mark Brown [Wed, 29 Apr 2009 19:28:47 +0000 (20:28 +0100)]
ASoC: Check for supported CPUs when building s3c-i2s-v2

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix error message formatting in s3c64xx-i2s driver
Mark Brown [Wed, 29 Apr 2009 17:51:48 +0000 (18:51 +0100)]
ASoC: Fix error message formatting in s3c64xx-i2s driver

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'for-2.6.30' into for-2.6.31
Mark Brown [Tue, 28 Apr 2009 18:33:45 +0000 (19:33 +0100)]
Merge branch 'for-2.6.30' into for-2.6.31

15 years agoASoC: TWL4030: Fix gain control for earpiece amplifier
Joonyoung Shim [Tue, 28 Apr 2009 09:18:05 +0000 (18:18 +0900)]
ASoC: TWL4030: Fix gain control for earpiece amplifier

The gain control for earpiece amplifier uses 0dB ~ 12dB according to the
TRM, but the present code is implemented to -6dB ~ 6dB.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoALSA: pcm core - Avoid jiffies check for devices with BATCH flag
Takashi Iwai [Tue, 28 Apr 2009 10:07:08 +0000 (12:07 +0200)]
ALSA: pcm core - Avoid jiffies check for devices with BATCH flag

The hardware devices with SNDRV_PCM_INFO_BATCH flag can't give the
precise current position.  And such hardwares have often big FIFO
in addition to the ring buffer, and it screws up the jiffies check
in pcm_lib.c.

This patch adds a simple check of info flag so that the driver skips
the jiffies check in snd_pcm_period_elapsed() when BATCH flag is set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: Add missing SNDRV_PCM_INFO_BATCH flag to some drivers
Takashi Iwai [Tue, 28 Apr 2009 10:25:59 +0000 (12:25 +0200)]
ALSA: Add missing SNDRV_PCM_INFO_BATCH flag to some drivers

Added SNDRV_PCM_INFO_BATCH flag to PCM info field of some drivers that
really don't give the precise pointer value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoRemove unused support code for refok sections.
Tim Abbott [Mon, 27 Apr 2009 18:02:27 +0000 (14:02 -0400)]
Remove unused support code for refok sections.

The old refok sections

  .text.init.refok
  .data.init.refok
  .exit.text.refok

have been deprecated since commit
312b1485fb509c9bc32eda28ad29537896658cb8.  After the other patches in
this patch series nothing is put in these sections, so clean things up
by eliminating all the remaining references to them.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosparc: cleanup references to deprecated .text.init* sections.
Tim Abbott [Mon, 27 Apr 2009 18:02:26 +0000 (14:02 -0400)]
sparc: cleanup references to deprecated .text.init* sections.

The section .text.init.refok is deprecated and __REF (.ref.text)
should be used in assembly files instead.  This patch cleans up a few
uses of .text.init.refok in the sparc architecture.

Also fix a reference to .text.init in a comment that wasn't updated to
.init.text.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosh: Use __INIT macro instead of .text.init.
Tim Abbott [Mon, 27 Apr 2009 18:02:25 +0000 (14:02 -0400)]
sh: Use __INIT macro instead of .text.init.

The sh architecture has some code in the .text.init section, but it
does not reference that section in its linker scripts.

This change moves this code from the .text.init section to the
.init.text section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopowerpc: Use __REF macro instead of old .text.init.refok.
Tim Abbott [Mon, 27 Apr 2009 18:02:24 +0000 (14:02 -0400)]
powerpc: Use __REF macro instead of old .text.init.refok.

The section .text.init.refok is deprecated and __REF (.ref.text)
should be used in assembly files instead.  This patch cleans up a few
uses of .text.init.refok in the powerpc architecture.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopowerpc: Use TEXT_TEXT macro in linker script.
Tim Abbott [Mon, 27 Apr 2009 18:02:23 +0000 (14:02 -0400)]
powerpc: Use TEXT_TEXT macro in linker script.

Rather than adding .ref.text to the powerpc linker script so that we
can use __REF on the powerpc architecture, it seems simpler to switch
to using the generic TEXT_TEXT macro.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoarm: Use __INIT macro instead of .text.init.
Tim Abbott [Mon, 27 Apr 2009 18:02:22 +0000 (14:02 -0400)]
arm: Use __INIT macro instead of .text.init.

arm is placing some code in the .text.init section, but it does not
reference that section in its linker scripts.

This change moves this code from the .text.init section to the
.init.text section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Use __INIT macro instead of .text.init.
Tim Abbott [Mon, 27 Apr 2009 23:37:58 +0000 (00:37 +0100)]
FRV: Use __INIT macro instead of .text.init.

FRV is placing some code in the .text.init section but does not reference that
section in its linker scripts.

This change moves this code from the .text.init section to the .init.text
section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Remove unused header asm/init.h.
Tim Abbott [Mon, 27 Apr 2009 23:37:53 +0000 (00:37 +0100)]
FRV: Remove unused header asm/init.h.

It seems nothing has included the frv asm/init.h header for some time, and its
actual contents are out of date with include/linux/init.h.  So just delete it.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoASoC: Staticise TLV values in WM8940
Mark Brown [Mon, 27 Apr 2009 19:57:42 +0000 (20:57 +0100)]
ASoC: Staticise TLV values in WM8940

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'for-2.6.30' into for-2.6.31
Mark Brown [Mon, 27 Apr 2009 19:47:35 +0000 (20:47 +0100)]
Merge branch 'for-2.6.30' into for-2.6.31

15 years agoASoC: Set the MPC5200 i2s driver to BROKEN status.
Jon Smirl [Mon, 27 Apr 2009 16:44:41 +0000 (12:44 -0400)]
ASoC: Set the MPC5200 i2s driver to BROKEN status.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix logic in WM8350 master clocking check
Mark Brown [Mon, 27 Apr 2009 18:18:22 +0000 (19:18 +0100)]
ASoC: Fix logic in WM8350 master clocking check

We need to check only if the WM8350 is master and only when starting
the stream so if either is not true then we can skip the check.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: cs4270: add Master Playback Switch
Daniel Mack [Fri, 24 Apr 2009 14:37:45 +0000 (16:37 +0200)]
ASoC: cs4270: add Master Playback Switch

This adds a new control named 'Master Playback Switch' for cs4270
codecs. It is implemented using the new SOC_DOUBLE_EXT macro to catch
the put function and store the information about manually set mute
controls from userspace. When a manual mute is set, we don't want the
soc core to un-mute the outputs.

Renamed cs4270_mute() to cs4270_dai_mute() to avoid confusion.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: cs4270: fix Master Capture Switch polarity
Daniel Mack [Fri, 24 Apr 2009 13:00:25 +0000 (15:00 +0200)]
ASoC: cs4270: fix Master Capture Switch polarity

The control modifies the MUTE register, hence the polarity must be
inverted.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-By: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC WM8940 Driver
Jonathan Cameron [Mon, 27 Apr 2009 13:49:44 +0000 (13:49 +0000)]
ASoC WM8940 Driver

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Use our registration function for S3C64xx
Mark Brown [Mon, 27 Apr 2009 19:24:15 +0000 (20:24 +0100)]
ASoC: Use our registration function for S3C64xx

Make sure we get the DAI operations initialised.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: s3c-i2s-v2 diagnostic improvements
Mark Brown [Mon, 27 Apr 2009 19:23:19 +0000 (20:23 +0100)]
ASoC: s3c-i2s-v2 diagnostic improvements

Say what invalid values we're seeing when we see an invalid value and
ensure that errors are displayed by default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Include WM8350 register definitions in CODEC header
Mark Brown [Mon, 27 Apr 2009 18:17:08 +0000 (19:17 +0100)]
ASoC: Include WM8350 register definitions in CODEC header

It's expected behaviour for the CODEC header to provide them but the
WM8350 doesn't due to having all the registers together under drivers/mfd.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Enforce symmetric rates for S3C64xx I2S interface
Mark Brown [Mon, 27 Apr 2009 13:28:44 +0000 (14:28 +0100)]
ASoC: Enforce symmetric rates for S3C64xx I2S interface

There is only one LRCLK pin on each interface.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoRevert "linux.conf.au 2009: Tuz"
Linus Torvalds [Mon, 27 Apr 2009 19:00:27 +0000 (12:00 -0700)]
Revert "linux.conf.au 2009: Tuz"

This reverts commit 8032b526d1a3bd91ad633dd3a3b5fdbc47ad54f1.

Hey, it was only meant to be a single release.  Now they can all die as
far as I'm concerned.

[ Just kidding.  They're cute and cuddly.

  Except when they have horrible nasty facial diseases.  Oh, and I guess
  they're not actually that cuddly even when disease-free. ]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Mon, 27 Apr 2009 18:59:46 +0000 (11:59 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: only save/restore existent registers in the PCIe capability
  x86/PCI: don't bother with root quirks if _CRS is used
  docbooks: add/fix PCI kernel-doc
  PCI: cleanup debug output resources
  x86/PCI: set_pci_bus_resources_arch_default cleanups
  x86/PCI: Move set_pci_bus_resources_arch_default into arch/x86
  x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case
  PCI quirk: disable MSI on VIA VT3364 chipsets

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Mon, 27 Apr 2009 18:16:33 +0000 (11:16 -0700)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: look for acls during btrfs_read_locked_inode
  Btrfs: fix acl caching
  Btrfs: Fix a bunch of printk() warnings.
  Btrfs: Fix a trivial warning using max() of u64 vs ULL.
  Btrfs: remove unused btrfs_bit_radix slab
  Btrfs: ratelimit IO error printks
  Btrfs: remove #if 0 code
  Btrfs: When shrinking, only update disk size on success
  Btrfs: fix deadlocks and stalls on dead root removal
  Btrfs: fix fallocate deadlock on inode extent lock
  Btrfs: kill btrfs_cache_create
  Btrfs: don't export symbols
  Btrfs: simplify makefile
  Btrfs: try to keep a healthy ratio of metadata vs data block groups

15 years agoBtrfs: look for acls during btrfs_read_locked_inode
Chris Mason [Mon, 27 Apr 2009 15:47:50 +0000 (11:47 -0400)]
Btrfs: look for acls during btrfs_read_locked_inode

This changes btrfs_read_locked_inode() to peek ahead in the btree for acl items.
If it is certain a given inode has no acls, it will set the in memory acl
fields to null to avoid acl lookups completely.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: fix acl caching
Chris Mason [Mon, 27 Apr 2009 14:49:53 +0000 (10:49 -0400)]
Btrfs: fix acl caching

Linus noticed the btrfs code to cache acls wasn't properly caching
a NULL acl when the inode didn't have any acls.  This meant the common
case of no acls resulted in expensive btree searches every time the
kernel checked permissions (which is quite often).

This is a modified version of Linus' original patch:

Properly set initial acl fields to BTRFS_ACL_NOT_CACHED in the inode.
This forces an acl lookup when permission checks are done.

Fix btrfs_get_acl to avoid lookups and locking when the inode acls fields
are set to null.

Fix btrfs_get_acl to use the right return value from __btrfs_getxattr
when deciding to cache a NULL acl.  It was storing a NULL acl when
__btrfs_getxattr return -ENOENT, but __btrfs_getxattr was actually returning
-ENODATA for this case.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 27 Apr 2009 15:54:43 +0000 (08:54 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: Fix Trivial Warnining in sound/pci/cmipci.c
  ALSA: snd-usb-caiaq: fix reported elapsed periods
  ASoC: s3c-i2s-v2 needs to declare a license for modular builds
  ALSA: hda - Fix init verbs of AD1884A mobile model
  ASoC: remove non-existing referece to CONFIG_SND_SOC_CODEC_WM8991
  ASoC: Fix WM8580 volume update handling for large register changes
  ASoC: Fix offset of freqmode in WM8580 PLL configuration

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Mon, 27 Apr 2009 15:40:00 +0000 (08:40 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-quota-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6:
  ext2: missing unlock in ext2_quota_write()
  quota: remove obsolete comments in fs/quota/Makefile

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Mon, 27 Apr 2009 15:39:02 +0000 (08:39 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Do not try to validate extents on special files
  ext4: Ignore i_file_acl_high unless EXT4_FEATURE_INCOMPAT_64BIT is present
  ext4: Fix softlockup caused by illegal i_file_acl value in on-disk inode

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Mon, 27 Apr 2009 15:38:51 +0000 (08:38 -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:
  ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex

15 years agoMerge branch 'sh/for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Mon, 27 Apr 2009 15:38:15 +0000 (08:38 -0700)]
Merge branch 'sh/for-2.6.30' of git://git./linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Fix up unsigned syscall_nr in SH-5 pt_regs.
  maple: input: fix up maple mouse driver
  sh: sh7785lcr: fix defconfig for 29-bit mode

15 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Mon, 27 Apr 2009 15:15:44 +0000 (17:15 +0200)]
Merge branch 'fix/misc' into for-linus

* fix/misc:
  ALSA: Fix Trivial Warnining in sound/pci/cmipci.c

15 years agoMerge branch 'fix/caiaq' into for-linus
Takashi Iwai [Mon, 27 Apr 2009 15:15:41 +0000 (17:15 +0200)]
Merge branch 'fix/caiaq' into for-linus

* fix/caiaq:
  ALSA: snd-usb-caiaq: fix reported elapsed periods

15 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Mon, 27 Apr 2009 15:15:35 +0000 (17:15 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Fix init verbs of AD1884A mobile model

15 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Mon, 27 Apr 2009 15:15:32 +0000 (17:15 +0200)]
Merge branch 'fix/asoc' into for-linus

* fix/asoc:
  ASoC: s3c-i2s-v2 needs to declare a license for modular builds
  ASoC: remove non-existing referece to CONFIG_SND_SOC_CODEC_WM8991
  ASoC: Fix WM8580 volume update handling for large register changes
  ASoC: Fix offset of freqmode in WM8580 PLL configuration

15 years agoFRV: Stop gcc from generating uninitialised variable warnings after BUG()
David Howells [Mon, 27 Apr 2009 10:55:23 +0000 (11:55 +0100)]
FRV: Stop gcc from generating uninitialised variable warnings after BUG()

Stop gcc from generating uninitialised variable warnings after BUG().
The problem is that FRV's call into its gdbstub appears to return (if
the function is marked noreturn, then the compiler is under no
obligation to pass it a return address, and so GDB won't know where the
bug happened).

To get around this, we make the do...while wrapper in _debug_bug_trap()
an endless loop from which there's no escape.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Wire up new syscalls
David Howells [Mon, 27 Apr 2009 10:55:17 +0000 (11:55 +0100)]
FRV: Wire up new syscalls

Wire up new system calls for the FRV arch (preadv and pwritev).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoext2: missing unlock in ext2_quota_write()
Dan Carpenter [Thu, 9 Apr 2009 16:07:10 +0000 (18:07 +0200)]
ext2: missing unlock in ext2_quota_write()

The inode->i_mutex should be unlocked.

Found by smatch (http://repo.or.cz/w/smatch.git).  Compile tested.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
15 years agoquota: remove obsolete comments in fs/quota/Makefile
Christoph Hellwig [Tue, 7 Apr 2009 16:10:06 +0000 (18:10 +0200)]
quota: remove obsolete comments in fs/quota/Makefile

Get rid of useless comments and the equally useless obj-y
initialization.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
15 years agoBtrfs: Fix a bunch of printk() warnings.
Joel Becker [Tue, 21 Apr 2009 19:38:29 +0000 (12:38 -0700)]
Btrfs: Fix a bunch of printk() warnings.

Just happened to notice a bunch of %llu vs u64 warnings.  Here's a patch
to cast them all.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: Fix a trivial warning using max() of u64 vs ULL.
Joel Becker [Tue, 21 Apr 2009 19:38:30 +0000 (12:38 -0700)]
Btrfs: Fix a trivial warning using max() of u64 vs ULL.

A small warning popped up on ia64 because inode-map.c was comparing a
u64 object id with the ULL FIRST_FREE_OBJECTID.  My first thought was
that all the OBJECTID constants should contain the u64 cast because
btrfs code deals entirely in u64s.  But then I saw how large that was,
and figured I'd just fix the max() call.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: remove unused btrfs_bit_radix slab
Chris Mason [Mon, 27 Apr 2009 11:49:10 +0000 (07:49 -0400)]
Btrfs: remove unused btrfs_bit_radix slab

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoALSA: Fix Trivial Warnining in sound/pci/cmipci.c
Subrata Modak [Mon, 27 Apr 2009 11:12:37 +0000 (16:42 +0530)]
ALSA: Fix Trivial Warnining in sound/pci/cmipci.c

Fixed the compile warning below by initializatin iomidi variable properly.
  sound/pci/cmipci.c: In function â€˜snd_cmipci_probe’:
  sound/pci/cmipci.c:3017: warning: â€˜iomidi’ may be used uninitialized in this function

Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
Cc: linux-pci <linux-pci@atrey.karlin.mff.cuni.cz>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoBtrfs: ratelimit IO error printks
Chris Mason [Mon, 27 Apr 2009 11:29:05 +0000 (07:29 -0400)]
Btrfs: ratelimit IO error printks

Btrfs has printks for various IO errors, including bad checksums and
mismatches between what we expect the block headers to contain and what
we actually find on the disk.

Longer term we need a real reporting mechanism for this, but for now
printk is going to have to do.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: remove #if 0 code
Chris Mason [Mon, 27 Apr 2009 11:29:04 +0000 (07:29 -0400)]
Btrfs: remove #if 0 code

Btrfs had some old code sitting around under #if 0, this drops it.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: When shrinking, only update disk size on success
Chris Ball [Mon, 27 Apr 2009 11:29:03 +0000 (07:29 -0400)]
Btrfs: When shrinking, only update disk size on success

Previously, we updated a device's size prior to attempting a shrink
operation.  This patch moves the device resizing logic to only happen if
the shrink completes successfully.  In the process, it introduces a new
field to btrfs_device -- disk_total_bytes -- to track the on-disk size.

Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoALSA: snd-usb-caiaq: fix reported elapsed periods
Daniel Mack [Mon, 27 Apr 2009 10:18:05 +0000 (12:18 +0200)]
ALSA: snd-usb-caiaq: fix reported elapsed periods

Reset the internal period position counter upon stream startup. This
fixes initial aplay underruns and problems related to latency picky
applications such as pulseaudio.

Bumped the version number to 1.3.14.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoptrace: ptrace_attach: fix the usage of ->cred_exec_mutex
Oleg Nesterov [Sun, 26 Apr 2009 23:41:34 +0000 (01:41 +0200)]
ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex

ptrace_attach() needs task->cred_exec_mutex, not current->cred_exec_mutex.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agosh: Fix up unsigned syscall_nr in SH-5 pt_regs.
Paul Mundt [Mon, 27 Apr 2009 08:05:38 +0000 (17:05 +0900)]
sh: Fix up unsigned syscall_nr in SH-5 pt_regs.

syscall_nr is presently defined as unsigned in the SH-5 pt_regs,
while the syscall restarting code wants it to be signed. Fix this
up, and bring it in line with the other SH parts.

Reported-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agomaple: input: fix up maple mouse driver
Adrian McMenamin [Sat, 25 Apr 2009 20:43:18 +0000 (20:43 +0000)]
maple: input: fix up maple mouse driver

The maple mouse driver currently in mainline is broken:

bash-3.1# modprobe maplemouse
[   56.886378] input: Dreamcast Mouse as /devices/virtual/input/input3
[   56.918379] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[   56.930543] pc = c003304e
[   56.934973] *pde = 00000000
[   56.944948] Oops: 0000 [#1]
[   56.947867] Modules linked in: maplemouse(+)
[   56.952353]
[   56.953921] Pid : 1157, Comm: \0x09\0x09modprobe
[   56.958021] CPU : 0        \0x09\0x09Not tainted  (2.6.30-rc2-00130-g3e98f9f #1)
[   56.958052]
[   56.966567] PC is at dc_mouse_open+0xe/0x40 [maplemouse]
[   56.972125] PR is at input_open_device+0x8a/0xc0
[   56.976944] PC  : c003304e SP  : 8c88bdcc SR  : 40008100 TEA : c0033834
[   56.983854] R0  : 000006c4 R1  : 00000000 R2  : 40008101 R3  : 00000000
[   56.990744] R4  : 8c8db800 R5  : c0033080 R6  : 00000005 R7  : 00000200
[   56.997635] R8  : 8c8db800 R9  : 8c8dbe3c R10 : 00000000 R11 : 8c98881c
[   57.004525] R12 : 8c8dbe64 R13 : 8ca50140 R14 : 8c88bdd4
[   57.010063] MACH: 00000497 MACL: 00000348 GBR : 29674440 PR  : 8c1b4d0a
[   57.016939]
...

Here is a fix for this, keeping an open and close, so reducing
the load on the system when the mouse is not in use, and also properly
referencing the maple device buffer following the recent update.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: sh7785lcr: fix defconfig for 29-bit mode
Yoshihiro Shimoda [Wed, 22 Apr 2009 10:50:19 +0000 (10:50 +0000)]
sh: sh7785lcr: fix defconfig for 29-bit mode

Fix the problem that cannot work 29-bit mode when use sh7785lcr_defconfig.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 26 Apr 2009 17:29:38 +0000 (10:29 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, hpet: Stop soliciting hpet=force users on ICH4M
  x86: check boundary in setup_node_bootmem()
  uv_time: add parameter to uv_read_rtc()
  x86: hpet: fix periodic mode programming on AMD 81xx
  x86: more than 8 32-bit CPUs requires X86_BIGSMP
  x86: avoid theoretical spurious NMI backtraces with CONFIG_CPUMASK_OFFSTACK=y
  x86: fix boot crash in NMI watchdog with CONFIG_CPUMASK_OFFSTACK=y and flat APIC
  x86-64: fix FPU corruption with signals and preemption
  x86/uv: fix for no memory at paddr 0
  docs, x86: add nox2apic back to kernel-parameters.txt
  x86: mm/numa_32.c calculate_numa_remap_pages should use __init
  x86, kbuild: make "make install" not depend on vmlinux
  x86/uv: fix init of cpu-less nodes
  x86/uv: fix init of memory-less nodes

15 years agoMerge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 26 Apr 2009 17:29:18 +0000 (10:29 -0700)]
Merge branch 'irq-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86/irq: mark NUMA_MIGRATE_IRQ_DESC broken
  x86, irq: Remove IRQ_DISABLED check in process context IRQ move

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 26 Apr 2009 17:29:01 +0000 (10:29 -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:
  locking: clarify kernel-taint warning message
  lockdep, x86: account for irqs enabled in paranoid_exit
  lockdep: more robust lockdep_map init sequence

15 years agosparc: convert to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:11:08 +0000 (22:11 -0400)]
sparc: convert to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosh: convert to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:11:07 +0000 (22:11 -0400)]
sh: convert to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agos390: convert to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:11:06 +0000 (22:11 -0400)]
s390: convert to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopowerpc: convert to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:11:05 +0000 (22:11 -0400)]
powerpc: convert to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomn10300: convert to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:11:04 +0000 (22:11 -0400)]
mn10300: convert to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agom68k: convert to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:11:03 +0000 (22:11 -0400)]
m68k: convert to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agom32r: convert to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:11:02 +0000 (22:11 -0400)]
m32r: convert to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofrv: convert frv to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:10:59 +0000 (22:10 -0400)]
frv: convert frv to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoalpha: convert to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:10:58 +0000 (22:10 -0400)]
alpha: convert to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Richard Henderson <rth@twiddle.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoxtensa: convert to use __HEAD and HEAD_TEXT macros.
Tim Abbott [Sun, 26 Apr 2009 02:10:57 +0000 (22:10 -0400)]
xtensa: convert to use __HEAD and HEAD_TEXT macros.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Chris Zankel <chris@zankel.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoAdd new HEAD_TEXT_SECTION macro.
Tim Abbott [Sun, 26 Apr 2009 02:10:56 +0000 (22:10 -0400)]
Add new HEAD_TEXT_SECTION macro.

This patch is preparation for replacing all uses of ".head.text" or
".text.head" in the kernel with macros, so that the section name can
later be changed without having to touch a lot of the kernel.

Since some linker scripts do more complex things than referencing
HEAD_TEXT, we add a HEAD_TEXT_SECTION macro that just contains the
actual name.

I've defined HEAD_TEXT_SECTION in a new header,
include/linux/section-names.h, so that this section name only needs to
appear in one place.  I anticipate creating similar macro structures
for a number of other section names.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".text.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoext4: Do not try to validate extents on special files
Theodore Ts'o [Fri, 24 Apr 2009 22:45:35 +0000 (18:45 -0400)]
ext4: Do not try to validate extents on special files

The EXTENTS_FL flag should never be set on special files, but if it
is, don't bother trying to validate that the extents tree is valid,
since only files, directories, and non-fast symlinks will ever have an
extent data structure.  We perhaps should flag the filesystem as being
corrupted if we see a special file (named pipes, device nodes, Unix
domain sockets, etc.) with the EXTENTS_FL flag, but e2fsck doesn't
currently check this case, so we'll just ignore this for now, since
it's harmless.

Without this fix, a special device with the extents flag is flagged as
an error by the kernel, so it is impossible to access or delete the
inode, but e2fsck doesn't see it as a problem, leading to
confused/frustrated users.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoPM/Hibernate: Fix waiting for image device to appear on resume
Rafael J. Wysocki [Fri, 24 Apr 2009 22:16:06 +0000 (00:16 +0200)]
PM/Hibernate: Fix waiting for image device to appear on resume

Commit c751085943362143f84346d274e0011419c84202 ("PM/Hibernate: Wait for
SCSI devices scan to complete during resume") added a call to
scsi_complete_async_scans() to software_resume(), so that it waited for
the SCSI scanning to complete, but the call was added at a wrong place.

Namely, it should have been added after wait_for_device_probe(), which
is called only if the image partition hasn't been specified yet.  Also,
it's reasonable to check if the image partition is present and only wait
for the device probing and SCSI scanning to complete if it is not the
case.

Additionally, since noresume is checked right at the beginning of
software_resume() and the function returns immediately if it's set, it
doesn't make sense to check it once again later.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoROMFS: Advance destination buffer pointer when reading from a blockdev
David Howells [Thu, 23 Apr 2009 15:41:18 +0000 (16:41 +0100)]
ROMFS: Advance destination buffer pointer when reading from a blockdev

RomFS should advance the destination buffer pointer when reading data from a
blockdev source (the data may be split over multiple blocks, each requiring its
own sb_read() call).  Without this, all the data is copied to the beginning of
the output buffer.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoROMFS: romfs_lookup() shouldn't be doing a partial name comparison
David Howells [Thu, 23 Apr 2009 15:41:13 +0000 (16:41 +0100)]
ROMFS: romfs_lookup() shouldn't be doing a partial name comparison

romfs_lookup() should be using a routine akin to strcmp() on the backing store,
rather than one akin to strncmp().  If it uses the latter, it's liable to match
/bin/shutdown when looking up /bin/sh.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agolib: find_last_bit.o needed by a module only, move it from lib to obj
Fred Isaman [Thu, 23 Apr 2009 13:40:32 +0000 (16:40 +0300)]
lib: find_last_bit.o needed by a module only, move it from lib to obj

Currently, although find_last_bit is EXPORTed, it is statically linked
with the kernel and is referenced only under CONFIG_SMP.

When CONFIG_SMP is undefined and find_last_bit is referenced only by
modules, linking fails with:

  ERROR: "find_last_bit" [fs/nfs/nfs.ko] undefined!

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoCacheFiles: Fix the documentation to use the correct credential pointer names
Marc Dionne [Thu, 23 Apr 2009 10:21:55 +0000 (11:21 +0100)]
CacheFiles: Fix the documentation to use the correct credential pointer names

Adjust the CacheFiles documentation to use the correct names of the credential
pointers in task_struct.

The documentation was using names from the old versions of the credentials
patches.

Signed-off-by: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agovirtio-rng: Remove false BUG for spurious callbacks
Christian Borntraeger [Thu, 23 Apr 2009 07:12:59 +0000 (16:42 +0930)]
virtio-rng: Remove false BUG for spurious callbacks

The virtio-rng drivers checks for spurious callbacks. Since
callbacks can be implemented via shared interrupts (e.g. PCI) this
could lead to guest kernel oopses with lots of virtio devices.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoext4: Ignore i_file_acl_high unless EXT4_FEATURE_INCOMPAT_64BIT is present
Theodore Ts'o [Fri, 24 Apr 2009 20:11:18 +0000 (16:11 -0400)]
ext4: Ignore i_file_acl_high unless EXT4_FEATURE_INCOMPAT_64BIT is present

Don't try to look at i_file_acl_high unless the INCOMPAT_64BIT feature
bit is set.  The field is normally zero, but older versions of e2fsck
didn't automatically check to make sure of this, so in the spirit of
"be liberal in what you accept", don't look at i_file_acl_high unless
we are using a 64-bit filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agoBtrfs: fix deadlocks and stalls on dead root removal
Chris Mason [Fri, 24 Apr 2009 18:39:25 +0000 (14:39 -0400)]
Btrfs: fix deadlocks and stalls on dead root removal

After a transaction commit, the old root of the subvol btrees are sent through
snapshot removal.  This is what actually frees up any blocks replaced by
COW, and anything the old blocks pointed to.

Snapshot deletion will pause when a transaction commit has started, which
helps to avoid a huge amount of delayed reference count updates piling up
as the transaction is trying to close.

But, this pause happens after the snapshot deletion process has asked other
procs on the system to throttle back a bit so that it can make progress.

We don't want to throttle everyone while we're waiting for the transaction
commit, it leads to deadlocks in the user transaction ioctls used by Ceph
and makes things slower in general.

This patch changes things to avoid the throttling while we sleep.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: fix fallocate deadlock on inode extent lock
Chris Mason [Fri, 24 Apr 2009 18:39:24 +0000 (14:39 -0400)]
Btrfs: fix fallocate deadlock on inode extent lock

The btrfs fallocate call takes an extent lock on the entire range
being fallocated, and then runs through insert_reserved_extent on each
extent as they are allocated.

The problem with this is that btrfs_drop_extents may decide to try
and take the same extent lock fallocate was already holding.  The solution
used here is to push down knowledge of the range that is already locked
going into btrfs_drop_extents.

It turns out that at least one other caller had the same bug.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: kill btrfs_cache_create
Christoph Hellwig [Mon, 13 Apr 2009 13:33:09 +0000 (15:33 +0200)]
Btrfs: kill btrfs_cache_create

Just use kmem_cache_create directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>