pandora-kernel.git
16 years agoSync with omap3-upstream
Tony Lindgren [Sun, 16 Aug 2009 17:15:23 +0000 (20:15 +0300)]
Sync with omap3-upstream

Few of the omap3-upstream patches have been updated, bring in
the changes to our master branch too while waiting for them
to go upstream.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix mach-omap2/serial.c merge to remove OMAP_TAG_UART
Tony Lindgren [Sun, 16 Aug 2009 16:39:46 +0000 (19:39 +0300)]
Fix mach-omap2/serial.c merge to remove OMAP_TAG_UART

Kalle's patch 7e9ccf7776bb68b5367eb0bb35e519df62bea35c gets
rid of the non-standard OMAP_TAG_UART. Earlier merge only
accounted for the conflicts between IO_ADDRESS and
OMAP2_IO_ADDRESS.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUpdate board-n8x0.c to be in sync with omap-upstream
Tony Lindgren [Sun, 16 Aug 2009 16:00:40 +0000 (19:00 +0300)]
Update board-n8x0.c to be in sync with omap-upstream

Update board-n8x0.c to be in sync with omap-upstream

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMerge branch 'omap_fixes_31' of git://git.pwsan.com/linux-2.6
Tony Lindgren [Sun, 16 Aug 2009 15:56:38 +0000 (18:56 +0300)]
Merge branch 'omap_fixes_31' of git://git.pwsan.com/linux-2.6

Conflicts:
arch/arm/mach-omap2/mux.c
arch/arm/plat-omap/include/mach/mux.h

16 years agoMerge branch 'pm-upstream/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Tony Lindgren [Sun, 16 Aug 2009 15:53:44 +0000 (18:53 +0300)]
Merge branch 'pm-upstream/fixes' of git://git./linux/kernel/git/khilman/linux-omap-pm

Conflicts:
arch/arm/mach-omap2/serial.c

16 years agoMerge branch 'omap-fixes'
Tony Lindgren [Sun, 16 Aug 2009 15:48:19 +0000 (18:48 +0300)]
Merge branch 'omap-fixes'

16 years agoserial: 8250: add IRQ trigger support
Vikram Pandita [Wed, 12 Aug 2009 17:17:06 +0000 (20:17 +0300)]
serial: 8250: add IRQ trigger support

serial: 8250: add IRQ trigger support

There is currently no provision for passing IRQ trigger flags for
serial IRQs with triggering requirements (such as GPIO IRQs)

This patch adds irqflags to plat_serial8250_port that can be passed
from board file to reqest_irq() of 8250 driver

Changes are backward compatible with boards passing UPF_SHARE_IRQ flag

Tested on Zoom2 board that has IRQF_TRIGGER_RISING requirement for 8250 irq

[Moved new flag to end to fix bugs in the original with the old_serial array
-- Alan]

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoMerge branch 'omap3-upstream'
Tony Lindgren [Wed, 12 Aug 2009 17:05:24 +0000 (20:05 +0300)]
Merge branch 'omap3-upstream'

16 years agoMerge branch 'omap-upstream'
Tony Lindgren [Wed, 12 Aug 2009 17:04:59 +0000 (20:04 +0300)]
Merge branch 'omap-upstream'

Conflicts:
arch/arm/mach-omap2/Makefile

16 years agoMerge branch 'omap-headers'
Tony Lindgren [Wed, 12 Aug 2009 16:55:42 +0000 (19:55 +0300)]
Merge branch 'omap-headers'

16 years agoREMOVE OMAP LEGACY CODE: Reset remaining arch/arm/*omap* changes except for EHCI
Tony Lindgren [Wed, 12 Aug 2009 14:05:35 +0000 (17:05 +0300)]
REMOVE OMAP LEGACY CODE: Reset remaining arch/arm/*omap* changes except for EHCI

Please provide patches against the mainline kernel if some of this is
needed back.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Remove board-n800*.[ch]
Tony Lindgren [Wed, 12 Aug 2009 13:53:26 +0000 (16:53 +0300)]
REMOVE OMAP LEGACY CODE: Remove board-n800*.[ch]

These will be replaced by Kalle Valo's cleaned up board-n8x0 patch.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: update OMAP3 Beagle defconfig
Paul Walmsley [Wed, 12 Aug 2009 12:06:36 +0000 (15:06 +0300)]
OMAP3: update OMAP3 Beagle defconfig

Update the OMAP3 Beagle defconfig to add EHCI, MMC, TWL4030 GPIO support.
Beagle can again use MMC rootfs after this patch.  Tested on BeagleBoard
rev C2.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jason Kridner <jkridner@beagleboard.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: beagle: add missing twl4030 usb platform_data
Felipe Balbi [Wed, 12 Aug 2009 12:06:36 +0000 (15:06 +0300)]
OMAP3: beagle: add missing twl4030 usb platform_data

without it twl4030_usb driver will not probe.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: Zoom2: Update board defconfig
Vikram Pandita [Wed, 12 Aug 2009 12:06:36 +0000 (15:06 +0300)]
OMAP3: Zoom2: Update board defconfig

Update defconfig for Zoom2 to include
TWL4030 core
TWL4030 drivers (bci, gpio, keypad, usb, mmc)

Also sync the defconfig after issuing a menuconfig

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: Zoom2: Add TWL4030 support
Vikram Pandita [Wed, 12 Aug 2009 12:06:35 +0000 (15:06 +0300)]
OMAP3: Zoom2: Add TWL4030 support

Add TWL4030 CORE and TWL4030 drivers to Zoom2 board file
TWL drivers enabled are:
bci
madc
usb
keypad
mmc

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: MMC: Add mux for pins
Vikram Pandita [Wed, 12 Aug 2009 12:06:34 +0000 (15:06 +0300)]
OMAP3: MMC: Add mux for pins

For OMAP3 add MMC1 MMC2 pin mux
MMC3 mux is not added as there are multiple configurations possible,
so the muxing is left to be done in board file

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Chikkature Rajashekar <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: rx51_defconfig: add twl4030 to rx51 default configuration
Timo Kokkonen [Wed, 12 Aug 2009 12:06:34 +0000 (15:06 +0300)]
OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration

twl4030 watchdog will be compiled as a module by default.

Signed-off-by: Atal Shargorodsky <ext-atal.shargorodsky@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: 3430SDP: Fix defconfig
Sergio Aguirre [Wed, 12 Aug 2009 12:06:34 +0000 (15:06 +0300)]
OMAP3: 3430SDP: Fix defconfig

This patch makes the SDP boot again with the defconfig.

Changes done:

 - Removes other selected boards.
 - Sets the Low Level debug output for UART1.
 - Disables some paripherals from other boards.

Tested on a SDP3430-VE5.1.0 (OMAP3430 ES3.1)

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3: Pass irqflags to 8250 driver
Vikram Pandita [Wed, 12 Aug 2009 12:06:33 +0000 (15:06 +0300)]
OMAP2/3: Pass irqflags to 8250 driver

Pass irqflags to 8250 driver with platform_data. At least Zoom2 has
IRQF_TRIGGER_RISING requirement for the 8250 GPIO irq.

This patch is dependent on 8250 driver changes getting accepted upstream:
http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git;a=commit;h=7053133124d5cdf207c1168c7a0c582a18e12ea7

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: iommu: add initial debugfs support
Hiroshi DOYU [Wed, 12 Aug 2009 12:06:33 +0000 (15:06 +0300)]
OMAP: iommu: add initial debugfs support

This enables to peek the following data.

$ /debug/iommu/isp# ls
mem             nr_tlb_entries  regs
mmap            pagetable       tlb
$ /debug/iommu/isp# head pagetable
L:      da:      pa:
-----------------------------------------
2: 00001000 8ae4a002
2: 00002000 8e7bb002
2: 00003000 8ae49002
2: 00004000 8ae65002
.....

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: iommu: fix wrong argument in flush_cache_vmap()
Hiroshi DOYU [Wed, 12 Aug 2009 12:06:32 +0000 (15:06 +0300)]
OMAP: iommu: fix wrong argument in flush_cache_vmap()

The second argument should be the end address, not the
length. Actually there will not be any effect on the behavior of this
driver since flush_cache_vmap() calls flush_cache_all() in the end.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2: n8x0: add n8x0_defconfig
Kalle Valo [Wed, 12 Aug 2009 12:06:13 +0000 (15:06 +0300)]
OMAP2: n8x0: add n8x0_defconfig

Add defconfig file for OMAP2 N800 and N810 devices.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2: add board file for Nokia N800 and N810
Kalle Valo [Wed, 12 Aug 2009 12:06:12 +0000 (15:06 +0300)]
OMAP2: add board file for Nokia N800 and N810

Add board file for Nokia N800 and N810 devices. Currently only serial ports,
onenand, spi and usb are configured, more to come later.

Tested on Nokia N800.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2: compile usb-tusb6010.c
Kalle Valo [Wed, 12 Aug 2009 12:06:11 +0000 (15:06 +0300)]
OMAP2: compile usb-tusb6010.c

For some reason usb-tusb6010.c was't compiled, add it to Makefile and
Kconfig. This is prepraration for upcoming n8x0 support.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP1: AMS_DELTA: add modem support
Janusz Krzysztofik [Tue, 11 Aug 2009 09:12:04 +0000 (12:12 +0300)]
OMAP1: AMS_DELTA: add modem support

This patch adds support for modem device found on Amstrad E3 (Delta) board.

Based on earlier patch by Jonathan McDowell, available at
http://the.earth.li/pub/e3/2.6.19/ams-delta-modem.patch.
Modified after Ladislav Michl's arch/arm/mach-omap1/board-voiceblue.c.

This patch is dependent on 8250 driver changes getting accepted upstream:
http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git;a=commit;h=7053133124d5cdf207c1168c7a0c582a18e12ea7

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: GPIO: Avoid generating extra IRQs
Eero Nurkkala [Tue, 11 Aug 2009 09:12:04 +0000 (12:12 +0300)]
OMAP: GPIO: Avoid generating extra IRQs

It is possible for GPIO IRQ lines configured with
falling edge triggering only to get IRQs at the
rising edge upon the exit of offmode. And vice
versa. Prevent such IRQs to arrive by generating
the IRQ obeying the detection scheme.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: Remove omap boot parsing code
Roger Quadros [Tue, 11 Aug 2009 09:12:04 +0000 (12:12 +0300)]
OMAP: Remove omap boot parsing code

Remove left over code for parsing omap boot tags. This is
no longer used.
see commit fc0ef1bfa1353e048e055374a09c75320d22231b

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: remove OMAP_TAG_UART
Kalle Valo [Tue, 11 Aug 2009 09:12:04 +0000 (12:12 +0300)]
OMAP: remove OMAP_TAG_UART

Omap tags are deprecrated and convert all OMAP_TAG_UART cases to use
omap_uart_platform_data instead.

Tested on rx51 and n8x0. Compile tested on omap_osk_5912.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: remove OMAP_TAG_SERIAL_CONSOLE
Kalle Valo [Tue, 11 Aug 2009 09:12:03 +0000 (12:12 +0300)]
OMAP: remove OMAP_TAG_SERIAL_CONSOLE

Omap tags are deprecated and remove OMAP_TAG_SERIAL_CONSOLE. Console must be
enabled with the console boot parameter instead.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: Remove ifdefs for io.h
Tony Lindgren [Tue, 11 Aug 2009 09:10:25 +0000 (12:10 +0300)]
OMAP: Remove ifdefs for io.h

Remove ifdefs for io.h

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: Rename OMAP_MPUIO_BASE to OMAP1_MPUIO_BASE
Tony Lindgren [Tue, 11 Aug 2009 09:10:25 +0000 (12:10 +0300)]
OMAP: Rename OMAP_MPUIO_BASE to OMAP1_MPUIO_BASE

Rename OMAP_MPUIO_BASE to OMAP1_MPUIO_BASE

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: Remove OMAP_IO_ADDRESS, use OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS instead
Tony Lindgren [Tue, 11 Aug 2009 09:10:24 +0000 (12:10 +0300)]
OMAP: Remove OMAP_IO_ADDRESS, use OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS instead

Search and replace OMAP_IO_ADDRESS with OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS,
and convert omap_read/write into a functions instead of a macros.

Also rename OMAP_MPUIO_VBASE to OMAP1_MPUIO_VBASE.

In the long run, most code should use ioremap + __raw_read/write instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: RX51: Updated rx51_defconfig
Roger Quadros [Mon, 10 Aug 2009 11:49:52 +0000 (14:49 +0300)]
OMAP3: RX51: Updated rx51_defconfig

Added REGULATOR, MMC and updated default CMDLINE so RX51 now boots.

Note that the regulator code should be moved from mmc-twl4030.c
to omap_hsmmc.c so it can be a module.

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
Roger Quadros [Mon, 10 Aug 2009 11:49:51 +0000 (14:49 +0300)]
OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up

twl_mmc_cleanup() must free up the regulators that were
allocated by twl_mmc_late_init().
This eliminates the below error when 'omap_hsmmc' module is
repeatedly loaded and unloaded.

"sysfs: cannot create duplicate filename '/devices/platform
 /mmci-omap-hs.0/microamps_requested_vmmc'"

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: RX51: Define TWL4030 USB transceiver in board file
Roger Quadros [Mon, 10 Aug 2009 11:49:51 +0000 (14:49 +0300)]
OMAP3: RX51: Define TWL4030 USB transceiver in board file

Add OTG transceiver to RX51 platform data to prevent kernel NULL pointer
dereference during MUSB initialisation.

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: Overo: Fix smsc911x platform device resource value
Sergio Aguirre [Mon, 10 Aug 2009 11:49:50 +0000 (14:49 +0300)]
OMAP3: Overo: Fix smsc911x platform device resource value

Fixes a wrong setting of resource parameter list in
SMSC911x platform driver data structure for Overo case.

This fixes folowing warning when compiling for Overo board:

warning: initialization from incompatible pointer type

Introduced since commit id:
commit 172ef275444efa12d834fb9d1b1acdac92db47f7
Author: Steve Sakoman <sakoman@gmail.com>
Date:   Mon Feb 2 06:27:49 2009 +0000

    ARM: Add SMSC911X support to Overo platform (V2)

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc...
Janboe Ye [Mon, 10 Aug 2009 11:49:50 +0000 (14:49 +0300)]
OMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc size

commit e85c205ac1427f2405021a36f083280ff0d0a35e increase vmalloc size.
vmalloc space will overlap with OMAP3 sram virtual address.

Signed-off-by: Li Hong Mei <hong-mei.li@motorola.com>
Signed-off-by: Janboe Ye <yuan-bo.ye@motorola.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP2/3: DMA errata correction
Vikram Pandita [Mon, 10 Aug 2009 11:49:50 +0000 (14:49 +0300)]
OMAP2/3: DMA errata correction

This errata is valid for:
OMAP2420 Errata 1.85 Impacts all 2420 ES rev
OMAP2430 Errata 1.10 Impacts only ES1.0
Description: DMA may hang when several channels are used in parallel
OMAP3430: Not impacted, so remove the errata fix for omap3

Fixed issue reported on cpu_is_omap24xx check reported by Nishant Kamat

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Reviewed-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP: Fix testing of cpu defines for mach-omap1
Tony Lindgren [Mon, 10 Aug 2009 11:49:50 +0000 (14:49 +0300)]
OMAP: Fix testing of cpu defines for mach-omap1

There's no need to keep these defines limited in the ifdef block
for mach-omap2. It will just cause problems testing for the CPU
revision in the common code, like the next patch does for the DMA
errata.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: Overo: add missing pen-down GPIO definition
Kevin Hilman [Mon, 20 Jul 2009 16:09:23 +0000 (09:09 -0700)]
OMAP3: Overo: add missing pen-down GPIO definition

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP: GPIO: clear/restore level/edge detect settings on mask/unmask
Kevin Hilman [Thu, 4 Jun 2009 22:57:10 +0000 (15:57 -0700)]
OMAP: GPIO: clear/restore level/edge detect settings on mask/unmask

If IRQ triggering is enabled, it can trigger a pending interrupt
even for masked interrupts.  Any pending GPIO interrupts can
prevent the powerdomain from hitting retention.

Problem found, reported and additional review and testing by Chunquiu
Wang.

Tested-by: Chunquiu Wang <cqwang@motorola.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP3: PM: Fix wrong sequence in suspend.
Jouni Hogander [Wed, 29 Oct 2008 10:06:04 +0000 (12:06 +0200)]
OMAP3: PM: Fix wrong sequence in suspend.

Powerdomain previous state is checked after restoring new states in
suspend. This patch fixes this problem.

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP: PM: CPUfreq: obey min/max settings of policy
Eero Nurkkala [Tue, 23 Jun 2009 09:53:29 +0000 (12:53 +0300)]
OMAP: PM: CPUfreq: obey min/max settings of policy

Use the min/max settings from CPUfreq policy rather than
processor defined min/max settings.

Without this patch, it's possible to scale frequency outside
the current policy range.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP2/3/4: UART: allow in-order port traversal
Kevin Hilman [Wed, 1 Jul 2009 04:02:45 +0000 (21:02 -0700)]
OMAP2/3/4: UART: allow in-order port traversal

Use list_add_tail() when adding discovered UART ports.  This is so
traversal using list_for_each_entry() will traverse the list in the
order they were found.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP2/3/4: UART: Allow per-UART disabling wakeup for serial ports
Kevin Hilman [Mon, 27 Apr 2009 19:27:36 +0000 (12:27 -0700)]
OMAP2/3/4: UART: Allow per-UART disabling wakeup for serial ports

This patch causes the OMAP uarts to honor the sysfs power/wakeup file
for IOPAD wakeups. Before the OMAP was always woken up from off mode
on a rs232 signal change.  This patch also creates a different
platform device for each serial port so that the wakeup properties can
be control per port.

By default, IOPAD wakeups are enabled for each UART.  To disable,

  # echo disabled > /sys/devices/platform/serial8250.0/power/wakeup

Where serial8250.0 can be replaced by .1, or .2 to control the other
ports.

Original idea and original patch from Russ Dill <russ.dill@gmail.com>

Cc: Russ Dill <russ.dill@gmail.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP3: Fixed crash bug with serial + suspend
Tero Kristo [Thu, 5 Mar 2009 14:32:23 +0000 (16:32 +0200)]
OMAP3: Fixed crash bug with serial + suspend

It was possible for an unhandled interrupt to occur if there was incoming
serial traffic during wakeup from suspend. This was caused by the code
in arch-arm/mach-omap2/serial.c keeping interrupt enabled all the time,
but not acking its interrupts. Applies on top of PM branch.

Use the PM begin/end hooks to ensure that the "serial idle" interrupts
are disabled during the suspend path.  Also, since begin/end hooks are
now used, use the suspend_state that is passed in the begin hook instead
of the enter hook as per the platform_suspend_ops docs.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP4: UART: cleanup special case IRQ handling
Kevin Hilman [Wed, 24 Jun 2009 17:32:03 +0000 (10:32 -0700)]
OMAP4: UART: cleanup special case IRQ handling

Streamline the OMAP4 special IRQ assignments by putting inside
normal init loop instead of having a separate loop.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP3: PM: Do not build suspend code if SUSPEND is not enabled
Kevin Hilman [Wed, 24 Jun 2009 18:39:18 +0000 (11:39 -0700)]
OMAP3: PM: Do not build suspend code if SUSPEND is not enabled

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP3: PM: prevent module wakeups from waking IVA2
Kevin Hilman [Tue, 5 May 2009 23:34:25 +0000 (16:34 -0700)]
OMAP3: PM: prevent module wakeups from waking IVA2

By default, prevent functional wakeups from inside a module from
waking up the IVA2.  Let DSP Bridge code handle this when loaded.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP3: PM: Clear pending PRCM reset flags on init
Kevin Hilman [Mon, 27 Apr 2009 23:14:54 +0000 (16:14 -0700)]
OMAP3: PM: Clear pending PRCM reset flags on init

Any pending reset flags can prevent retention.  Ensure they are all
cleared during boot.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP3: PM: Ensure PRCM interrupts are cleared at boot
Kevin Hilman [Mon, 27 Apr 2009 14:50:23 +0000 (07:50 -0700)]
OMAP3: PM: Ensure PRCM interrupts are cleared at boot

Any pending PRCM interrupts can prevent retention.  Ensure
they are cleared during boot.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP3: PM: CM_REGADDR macros using wrong name
Kevin Hilman [Tue, 9 Jun 2009 18:45:30 +0000 (11:45 -0700)]
OMAP3: PM: CM_REGADDR macros using wrong name

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP2/3: PM: make PM __init calls static
Kevin Hilman [Wed, 10 Jun 2009 16:02:25 +0000 (09:02 -0700)]
OMAP2/3: PM: make PM __init calls static

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agoOMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs
Roger Quadros [Wed, 5 Aug 2009 13:53:24 +0000 (16:53 +0300)]
OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs

gpio_get() should return DATAIN register value when the GPIO
is configured as input whereas it should return DATAOUT register
value when the GPIO is configured as output.
Now /sys/kernel/debug/gpio shows proper values for output GPIOs

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: EHCI: Allow EHCI to work as a module again
Anand Gadiyar [Wed, 5 Aug 2009 13:22:59 +0000 (16:22 +0300)]
OMAP3: EHCI: Allow EHCI to work as a module again

OMAP3: EHCI: Allow EHCI to work as a module again

commit fc3c45ca seems to have broken EHCI as a module. Fix this.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Tue, 4 Aug 2009 14:45:13 +0000 (17:45 +0300)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

Conflicts:
drivers/leds/Kconfig
drivers/leds/Makefile

16 years agoSync all non-omap arch/arm files to mainline
Tony Lindgren [Tue, 4 Aug 2009 14:22:42 +0000 (17:22 +0300)]
Sync all non-omap arch/arm files to mainline

Sync all non-omap arch/arm files to mainline

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoLinux 2.6.31-rc5 v2.6.31-rc5
Linus Torvalds [Sat, 1 Aug 2009 00:40:45 +0000 (17:40 -0700)]
Linux 2.6.31-rc5

16 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 31 Jul 2009 19:17:37 +0000 (12:17 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: bump up nr_to_write in xfs_vm_writepage
  xfs: reduce bmv_count in xfs_vn_fiemap

16 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 31 Jul 2009 19:10:26 +0000 (12:10 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  io context: fix ref counting
  block: make the end_io functions be non-GPL exports
  block: fix improper kobject release in blk_integrity_unregister
  block: always assign default lock to queues
  mg_disk: Add missing ready status check on mg_write()
  mg_disk: fix issue with data integrity on error in mg_write()
  mg_disk: fix reading invalid status when use polling driver
  mg_disk: remove prohibited sleep operation

16 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 31 Jul 2009 19:09:57 +0000 (12:09 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  clocksource: Save mult_orig in clocksource_disable()

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Fri, 31 Jul 2009 19:09:22 +0000 (12:09 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc: orphan subsystem
  imxmmc: Remove unnecessary semicolons
  cb710: use SG_MITER_TO_SG/SG_MITER_FROM_SG
  sdhci: use SG_MITER_TO_SG/SG_MITER_FROM_SG
  lib/scatterlist: add a flags to signalize mapping direction

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 31 Jul 2009 19:09:02 +0000 (12:09 -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: sound/aoa: Add kmalloc NULL tests
  ALSA: hda - Increase PCM stream name buf in patch_realtek.c
  sound: mpu401.c: Buffer overflow
  sound: aedsp16: Buffer overflow
  ALSA: hda: fix out-of-bound hdmi_eld.sad[] write
  ALSA: hda - Add quirk for Dell Studio 1555

16 years agoclocksource: Save mult_orig in clocksource_disable()
Magnus Damm [Tue, 28 Jul 2009 21:09:55 +0000 (14:09 -0700)]
clocksource: Save mult_orig in clocksource_disable()

To fix the common case where ->enable() does not set up
mult, make sure mult_orig is saved in mult on disable.

Also add comments to explain why we do this.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Cc: johnstul@us.ibm.com
Cc: lethal@linux-sh.org
Cc: akpm@linux-foundation.org
LKML-Reference: <20090618152432.10136.9932.sendpatchset@rx1.opensource.se>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agommc: orphan subsystem
Pierre Ossman [Fri, 31 Jul 2009 10:27:28 +0000 (12:27 +0200)]
mmc: orphan subsystem

I do not have the time to take care of this, so remove myself as
maintainer.

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
16 years agoimxmmc: Remove unnecessary semicolons
Joe Perches [Sun, 28 Jun 2009 16:26:31 +0000 (09:26 -0700)]
imxmmc: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
16 years agocb710: use SG_MITER_TO_SG/SG_MITER_FROM_SG
Sebastian Andrzej Siewior [Mon, 22 Jun 2009 07:18:05 +0000 (09:18 +0200)]
cb710: use SG_MITER_TO_SG/SG_MITER_FROM_SG

the code allready uses flush_kernel_dcache_page(). This patch updates the
driver to the recent sg API changes which require that either SG_MITER_TO_SG
or SG_MITER_FROM_SG is set. SG_MITER_TO_SG calls flush_kernel_dcache_page()
in sg_mitter_stop()

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
16 years agosdhci: use SG_MITER_TO_SG/SG_MITER_FROM_SG
Sebastian Andrzej Siewior [Thu, 18 Jun 2009 07:33:32 +0000 (09:33 +0200)]
sdhci: use SG_MITER_TO_SG/SG_MITER_FROM_SG

so the page will be flushed on unmap on ARCH which need it.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
16 years agolib/scatterlist: add a flags to signalize mapping direction
Sebastian Andrzej Siewior [Thu, 18 Jun 2009 08:19:12 +0000 (10:19 +0200)]
lib/scatterlist: add a flags to signalize mapping direction

sg_miter_start() is currently unaware of the direction of the copy
process (to or from the scatter list). It is important to know the
direction because the page has to be flushed in case the data written
is seen on a different mapping in user land on cache incoherent
architectures.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
16 years agoMerge branch 'fix/oss' into for-linus
Takashi Iwai [Fri, 31 Jul 2009 08:17:45 +0000 (10:17 +0200)]
Merge branch 'fix/oss' into for-linus

* fix/oss:
  sound: mpu401.c: Buffer overflow
  sound: aedsp16: Buffer overflow

16 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Fri, 31 Jul 2009 08:17:44 +0000 (10:17 +0200)]
Merge branch 'fix/misc' into for-linus

* fix/misc:
  ALSA: sound/aoa: Add kmalloc NULL tests

16 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Fri, 31 Jul 2009 08:17:42 +0000 (10:17 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Increase PCM stream name buf in patch_realtek.c
  ALSA: hda: fix out-of-bound hdmi_eld.sad[] write
  ALSA: hda - Add quirk for Dell Studio 1555

16 years agoALSA: sound/aoa: Add kmalloc NULL tests
Julia Lawall [Fri, 31 Jul 2009 06:32:03 +0000 (08:32 +0200)]
ALSA: sound/aoa: Add kmalloc NULL tests

Check that the result of kzalloc is not NULL before a dereference.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression *x;
identifier f;
constant char *C;
@@

x = \(kmalloc\|kcalloc\|kzalloc\)(...);
... when != x == NULL
    when != x != NULL
    when != (x || ...)
(
kfree(x)
|
f(...,C,...,x,...)
|
*f(...,x,...)
|
*x->f
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hda - Increase PCM stream name buf in patch_realtek.c
Takashi Iwai [Fri, 31 Jul 2009 08:05:11 +0000 (10:05 +0200)]
ALSA: hda - Increase PCM stream name buf in patch_realtek.c

The name buf with size 16 is too short for some codec names, e.g.
truncated like "ALC861-VD Analo".  Now the size is doubled.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoio context: fix ref counting
Li Zefan [Fri, 31 Jul 2009 06:55:48 +0000 (08:55 +0200)]
io context: fix ref counting

Commit d9c7d394a8ebacb60097b192939ae9f15235225e
("block: prevent possible io_context->refcount overflow") mistakenly
changed atomic_inc(&ioc->nr_tasks) to atomic_long_inc(&ioc->refcount).

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoxfs: bump up nr_to_write in xfs_vm_writepage
Eric Sandeen [Fri, 31 Jul 2009 05:02:17 +0000 (00:02 -0500)]
xfs: bump up nr_to_write in xfs_vm_writepage

VM calculation for nr_to_write seems off.  Bump it way
up, this gets simple streaming writes zippy again.
To be reviewed again after Jens' writeback changes.

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Cc: Chris Mason <chris.mason@oracle.com>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
16 years agoxfs: reduce bmv_count in xfs_vn_fiemap
Eric Sandeen [Mon, 27 Jul 2009 02:52:01 +0000 (21:52 -0500)]
xfs: reduce bmv_count in xfs_vn_fiemap

commit 6321e3ed2acf3ee9643cdd403e1c88605d7944ba caused
the full bmv_count's worth of getbmapx structures to get
allocated; telling it to do MAXEXTNUM was a bit insane,
resulting in ENOMEM every time.

Chop it down to something reasonable, the number of slots
in the caller's input buffer.  If this is too large the
caller may get ENOMEM but the reason should not be a
mystery, and they can try again with something smaller.

We add 1 to the value because in the normal getbmap
world, bmv_count includes the header and xfs_getbmap does:

        nex = bmv->bmv_count - 1;
        if (nex <= 0)
                return XFS_ERROR(EINVAL);

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
16 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 30 Jul 2009 23:46:58 +0000 (16:46 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing/stat: Fix seqfile memory leak
  function-graph: Fix seqfile memory leak
  trace_stack: Fix seqfile memory leak
  profile: Suppress warning about large allocations when profile=1 is specified

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Thu, 30 Jul 2009 23:46:48 +0000 (16:46 -0700)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: be more polite in the async caching threads
  Btrfs: preserve commit_root for async caching

16 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Thu, 30 Jul 2009 23:46:31 +0000 (16:46 -0700)]
Merge branch 'next' of git://git./linux/kernel/git/djbw/async_tx

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  dmaengine: at_hdmac: add DMA slave transfers
  dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller
  dmaengine: dmatest: correct thread_count while using multiple thread per channel
  dmaengine: dmatest: add a maximum number of test iterations
  drivers/dma: Remove unnecessary semicolons
  drivers/dma/fsldma.c: Remove unnecessary semicolons
  dmaengine: move HIGHMEM64G restriction to ASYNC_TX_DMA
  fsldma: do not clear bandwidth control bits on the 83xx controller
  fsldma: enable external start for the 83xx controller
  fsldma: use PCI Read Multiple command

16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Thu, 30 Jul 2009 23:46:17 +0000 (16:46 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-udf-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
  udf: Fix loading of VAT inode when drive wrongly reports number of recorded blocks

16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Thu, 30 Jul 2009 23:46:06 +0000 (16:46 -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:
  quota: Silence lockdep on quota_on

16 years agoMerge git://git.infradead.org/users/cbou/battery-2.6.31
Linus Torvalds [Thu, 30 Jul 2009 23:45:53 +0000 (16:45 -0700)]
Merge git://git.infradead.org/users/cbou/battery-2.6.31

* git://git.infradead.org/users/cbou/battery-2.6.31:
  Add ds2782 battery gas gauge driver
  olpc_battery: Ensure that the TRICKLE bit is checked
  olpc_battery: Fix up eeprom read function

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
Linus Torvalds [Thu, 30 Jul 2009 23:45:37 +0000 (16:45 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  GFS2: remove dcache entries for remote deleted inodes
  GFS2: Fix incorrent statfs consistency check
  GFS2: Don't put unlikely reclaim candidates on the reclaim list.
  GFS2: Don't try and dealloc own inode
  GFS2: Fix panic in glock memory shrinker
  GFS2: keep statfs info in sync on grows
  GFS2: Shrink the shrinker

16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 30 Jul 2009 23:45:20 +0000 (16:45 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Update defconfigs for embedded 6xx/7xxx, 8xx, 8{3,5,6}xxx
  powerpc/86xx: Update GE Fanuc sbc310 default configuration
  powerpc/86xx: Update defconfig for GE Fanuc's PPC9A
  cpm_uart: Don't use alloc_bootmem in cpm_uart_cpm2.c
  powerpc/83xx: Fix PCI IO base address on MPC837xE-RDB boards
  powerpc/85xx: Don't scan for TBI PHY addresses on MPC8569E-MDS boards
  powerpc/85xx: Fix ethernet link detection on MPC8569E-MDS boards
  powerpc/mm: Fix SMP issue with MMU context handling code

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Thu, 30 Jul 2009 23:45:03 +0000 (16:45 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  lguest and virtio: cleanup struct definitions to Linux style.
  lguest: update commentry
  lguest: fix comment style
  virtio: refactor find_vqs
  virtio: delete vq from list
  virtio: fix memory leak on device removal
  lguest: fix descriptor corruption in example launcher
  lguest: dereferencing freed mem in add_eventfd()

16 years agokprobes: Use kernel_text_address() for checking probe address
Masami Hiramatsu [Tue, 28 Jul 2009 23:47:23 +0000 (19:47 -0400)]
kprobes: Use kernel_text_address() for checking probe address

Use kernel_text_address() for checking probe address instead of
__kernel_text_address(), because __kernel_text_address() returns true
for init functions even after relaseing those functions.

That will hit a BUG() in text_poke().

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAlan doesn't want to maintain tty code any more
Linus Torvalds [Thu, 30 Jul 2009 23:40:37 +0000 (16:40 -0700)]
Alan doesn't want to maintain tty code any more

Not that anybody can blame him.  It's a morass.  But hey, it's way
better than it _used_ to be, though, so thanks for all the fish.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoquota: Silence lockdep on quota_on
Jan Kara [Wed, 22 Jul 2009 16:12:17 +0000 (18:12 +0200)]
quota: Silence lockdep on quota_on

Commit d01730d74d2b0155da50d44555001706294014f7 didn't completely fix
the problem since we still take dqio_mutex and i_mutex in the wrong
order. Move taking of i_mutex further down (luckily it's needed only
for updating inode flags) below where dqio_mutex is taken.

Tested-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoudf: Fix loading of VAT inode when drive wrongly reports number of recorded blocks
Jan Kara [Tue, 14 Jul 2009 17:30:23 +0000 (19:30 +0200)]
udf: Fix loading of VAT inode when drive wrongly reports number of recorded blocks

VAT inode is located in the last block recorded block of the medium. When the
drive errorneously reports number of recorded blocks, we failed to load the VAT
inode and thus mount the medium. This patch makes kernel try to read VAT inode
from the last block of the device if it is different from the last recorded
block.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoBtrfs: be more polite in the async caching threads
Chris Mason [Thu, 30 Jul 2009 14:04:48 +0000 (10:04 -0400)]
Btrfs: be more polite in the async caching threads

The semaphore used by the async caching threads can prevent a
transaction commit, which can make the FS appear to stall.  This
releases the semaphore more often when a transaction commit is
in progress.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
16 years agoBtrfs: preserve commit_root for async caching
Yan Zheng [Thu, 30 Jul 2009 13:40:40 +0000 (09:40 -0400)]
Btrfs: preserve commit_root for async caching

The async block group caching code uses the commit_root pointer
to get a stable version of the extent allocation tree for scanning.
This copy of the tree root isn't going to change and it significantly
reduces the complexity of the scanning code.

During a commit, we have a loop where we update the extent allocation
tree root.  We need to loop because updating the root pointer in
the tree of tree roots may allocate blocks which may change the
extent allocation tree.

Right now the commit_root pointer is changed inside this loop.  It
is more correct to change the commit_root pointer only after all the
looping is done.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
16 years agoGFS2: remove dcache entries for remote deleted inodes
Benjamin Marzinski [Thu, 23 Jul 2009 23:52:34 +0000 (18:52 -0500)]
GFS2: remove dcache entries for remote deleted inodes

When a file is deleted from a gfs2 filesystem on one node, a dcache
entry for it may still exist on other nodes in the cluster. If this
happens, gfs2 will be unable to free this file on disk. Because of this,
it's possible to have a gfs2 filesystem with no files on it and no free
space. With this patch, when a node receives a callback notifying it
that the file is being deleted on another node, it schedules a new
workqueue thread to remove the file's dcache entry.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
16 years agoGFS2: Fix incorrent statfs consistency check
Benjamin Marzinski [Fri, 10 Jul 2009 23:13:26 +0000 (18:13 -0500)]
GFS2: Fix incorrent statfs consistency check

Since both linked and unlinked inodes are counted by rgd->rd_dinodes, It
makes no sense to count them with the used data blocks (first check that
I changed), it makes sense to count them with the linked inodes (second
check), and it makes no sense to care if there are more unlinked inodes
than linked ones. This fixes these errors.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
16 years agoGFS2: Don't put unlikely reclaim candidates on the reclaim list.
Benjamin Marzinski [Fri, 10 Jul 2009 23:04:24 +0000 (18:04 -0500)]
GFS2: Don't put unlikely reclaim candidates on the reclaim list.

GFS2 was placing far too many glocks on the reclaim list that were not good
candidates for freeing up from cache.  These locks would sit there and
repeatedly get scanned to see if they could be reclaimed, wasting a lot
of time when there was memory pressure. This fix does more checks on the
locks to see if they are actually likely to be removable from cache.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
16 years agoGFS2: Don't try and dealloc own inode
Steven Whitehouse [Fri, 10 Jul 2009 20:13:38 +0000 (21:13 +0100)]
GFS2: Don't try and dealloc own inode

When searching for unlinked, but still allocated inodes during block
allocation, avoid the block relating to the inode that is doing the
allocation. This fixes a hang caused when an unlinked, but still
open, inode tries to allocate some more blocks and lands up
finding itself during the search for deallocatable inodes.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
16 years agoGFS2: Fix panic in glock memory shrinker
Benjamin Marzinski [Tue, 30 Jun 2009 18:51:11 +0000 (13:51 -0500)]
GFS2: Fix panic in glock memory shrinker

It is possible for gfs2_shrink_glock_memory() to check a glock for
demotion
that's in the process of being freed by gfs2_glock_put().  In this case,
gfs2_shrink_glock_memory() will acquire a new reference to this glock,
and
then try to free the glock itself when it drops the refernce.  To solve
this, gfs2_shrink_glock_memory() just needs to check if the glock is in
the process of being freed, and if so skip it without ever unlocking the
lru_lock.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Acked-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
16 years agoGFS2: keep statfs info in sync on grows
Benjamin Marzinski [Thu, 25 Jun 2009 20:09:51 +0000 (15:09 -0500)]
GFS2: keep statfs info in sync on grows

GFS2 wasn't syncing its statfs info on grows.  This causes a problem
when you grow the filesystem on multiple nodes.  GFS2 would calculate
the new space based on the resource groups (which are always current),
and then assume that the filesystem had grown the from the existing
statfs size.  If you grew the filesystem on two different nodes in a
short time, the second node wouldn't see the statfs size change from the
first node, and would assume that it was grown by a larger amount than
it was.  When all these changes were synced out, the total fileystem
size would be incorrect (the first grow would be counted twice).

This patch syncs makes GFS2 read in the statfs changes from disk before
a grow, and write them out after the grow, while the master statfs inode
is locked.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
16 years agoGFS2: Shrink the shrinker
Steven Whitehouse [Thu, 25 Jun 2009 15:30:26 +0000 (16:30 +0100)]
GFS2: Shrink the shrinker

This patch removes some of the special cases that the shrinker
was trying to deal with. As a result we leave fewer items on
the list and none at all which cannot be demoted. This makes
the list scanning more efficient and solves some issues seen
with large numbers of inodes.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>