pandora-kernel.git
16 years agoOMAP2/3: omap mailbox: platform_get_irq() error ignored
Roel Kluin [Wed, 17 Jun 2009 09:47:21 +0000 (12:47 +0300)]
OMAP2/3: omap mailbox: platform_get_irq() error ignored

platform_get_irq may return -ENXIO. but struct omap_mbox mbox_dsp_info.irq
is unsigned, so the error was not noticed.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3: mmc-twl4030: use correct controller in twl_mmc23_set_power
Grazvydas Ignotas [Wed, 17 Jun 2009 09:47:21 +0000 (12:47 +0300)]
OMAP2/3: mmc-twl4030: use correct controller in twl_mmc23_set_power

twl_mmc23_set_power() has MMC2 twl_mmc_controller hardcoded in it, which
breaks MMC3. Find the right controller to use instead.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP1: remove duplicated #include
Huang Weiyi [Wed, 17 Jun 2009 09:47:15 +0000 (12:47 +0300)]
OMAP1: remove duplicated #include

Remove duplicated #include in arch/arm/mach-omap1/board-nokia770.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP1: Fix N770 MMC support
Andrew de Quincey [Wed, 17 Jun 2009 09:47:15 +0000 (12:47 +0300)]
OMAP1: Fix N770 MMC support

Some of the N770's MMC configuration options seem to have been
dropped. This patch adds them back in again.

Note that only the .ocr_mask change was /critical/, but I've added the
.max_freq setting back as well, as the original sources had it. Can
anyone confirm if this is unnecessary?

Secondly, there is support in the original code for a 4wire/higher
speed mode. As I don't have the requisite N770 hardware (I think it
was a rev2 N770?) to test this, I can't really add it back.

Signed-off-by: Andrew de Quincey <adq@lidskialf.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP1: Fix compilation of arch/arm/mach-omap1/mailbox.c
Jonathan McDowell [Wed, 17 Jun 2009 09:47:15 +0000 (12:47 +0300)]
OMAP1: Fix compilation of arch/arm/mach-omap1/mailbox.c

This fixes the positioning of " in MODULE_AUTHOR, which is currently
causing a build failure on latest git with CONFIG_OMAP_MBOX_FWK=m; the
original breakage appears to date from the end of last year in
a5abbbe52b7e89a7633319c5417bd4331f7ac8ed

Signed-Off-By: Jonathan McDowell <noodles@earth.li>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMerge branch 'omap-clock-upstream'
Tony Lindgren [Mon, 15 Jun 2009 09:48:39 +0000 (12:48 +0300)]
Merge branch 'omap-clock-upstream'

16 years agoOMAP2 clock/powerdomain: off by 1 error in loop timeout comparisons
Roel Kluin [Mon, 15 Jun 2009 08:00:51 +0000 (02:00 -0600)]
OMAP2 clock/powerdomain: off by 1 error in loop timeout comparisons

with while (i++ < MAX_CLOCK_ENABLE_WAIT); i can reach MAX_CLOCK_ENABLE_WAIT + 1
after the loop, so if (i == MAX_CLOCK_ENABLE_WAIT) that's still success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 SDRC: set FIXEDDELAY when disabling SDRC DLL
Paul Walmsley [Mon, 15 Jun 2009 08:00:50 +0000 (02:00 -0600)]
OMAP3 SDRC: set FIXEDDELAY when disabling SDRC DLL

Correspondence with the TI OMAP hardware team indicates that
SDRC_DLLA_CTRL.FIXEDDELAY should be initialized to 0x0f.  This number
was apparently derived from process validation.  This is only used
when the SDRC DLL is unlocked (e.g., SDRC clock frequency less than
83MHz).

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3: Add support for DPLL3 divisor values higher than 2
Tero Kristo [Mon, 15 Jun 2009 08:00:49 +0000 (02:00 -0600)]
OMAP3: Add support for DPLL3 divisor values higher than 2

Previously only 1 and 2 was supported. This is needed for DVFS VDD2 control.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
16 years agoOMAP3 SRAM: convert SRAM code to use macros rather than magic numbers
Paul Walmsley [Mon, 15 Jun 2009 08:00:49 +0000 (02:00 -0600)]
OMAP3 SRAM: convert SRAM code to use macros rather than magic numbers

Convert omap3_sram_configure_core_dpll() to use macros rather than
magic numbers.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 SRAM: add more comments on the SRAM code
Paul Walmsley [Mon, 15 Jun 2009 08:00:48 +0000 (02:00 -0600)]
OMAP3 SRAM: add more comments on the SRAM code

Clean up comments and copyrights on the CORE DPLL3 M2 divider change code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 clock/SDRC: program SDRC_MR register during SDRC clock change
Paul Walmsley [Mon, 15 Jun 2009 08:00:44 +0000 (02:00 -0600)]
OMAP3 clock/SDRC: program SDRC_MR register during SDRC clock change

Program the SDRC_MR_0 register as well during SDRC clock changes.
This register allows selection of the memory CAS latency.  Some SDRAM
chips, such as the Qimonda HYB18M512160AF6, have a lower CAS latency
at lower clock rates.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 clock: add a short delay when lowering CORE clk rate
Paul Walmsley [Mon, 15 Jun 2009 08:00:43 +0000 (02:00 -0600)]
OMAP3 clock: add a short delay when lowering CORE clk rate

When changing the SDRAM clock from 166MHz to 83MHz via the CORE DPLL M2
divider, add a short delay before returning to SDRAM to allow the SDRC
time to stabilize.  Without this delay, the system is prone to random
panics upon re-entering SDRAM.

This time delay varies based on MPU frequency.  At 500MHz MPU frequency at
room temperature, 64 loops seems to work okay; so add another 32 loops for
environmental and process variation.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 clock: initialize SDRC timings at kernel start
Paul Walmsley [Mon, 15 Jun 2009 08:00:42 +0000 (02:00 -0600)]
OMAP3 clock: initialize SDRC timings at kernel start

On the OMAP3, initialize SDRC timings when the kernel boots.  This ensures
that the kernel is running with known, optimized SDRC timings, rather than
whatever was configured by the bootloader.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 clock: remove wait for DPLL3 M2 clock to stabilize
Paul Walmsley [Mon, 15 Jun 2009 08:00:42 +0000 (02:00 -0600)]
OMAP3 clock: remove wait for DPLL3 M2 clock to stabilize

The original CDP kernel that this code comes from waited for 0x800
loops after switching the CORE DPLL M2 divider.  This does not appear
to be necessary.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoRevert "Merge branch 'omap-clock-upstream'"
Tony Lindgren [Mon, 15 Jun 2009 09:39:31 +0000 (12:39 +0300)]
Revert "Merge branch 'omap-clock-upstream'"

This reverts commit a9126b88d82a75287ec4ec4aaef379bc6db660b9, reversing
changes made to fc3c45cab8b447dd597bef521694934e62ef97a3.

While pulling in Paul's omap-clock-upstream, I accidentally pulled
in all the changes going in to mainline for 2.6.31. Sorry for the
extra noise.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMerge branch 'omap-clock-upstream'
Tony Lindgren [Mon, 15 Jun 2009 08:19:37 +0000 (11:19 +0300)]
Merge branch 'omap-clock-upstream'

16 years agoOMAP2 clock/powerdomain: off by 1 error in loop timeout comparisons
Roel Kluin [Mon, 15 Jun 2009 08:00:51 +0000 (02:00 -0600)]
OMAP2 clock/powerdomain: off by 1 error in loop timeout comparisons

with while (i++ < MAX_CLOCK_ENABLE_WAIT); i can reach MAX_CLOCK_ENABLE_WAIT + 1
after the loop, so if (i == MAX_CLOCK_ENABLE_WAIT) that's still success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 SDRC: set FIXEDDELAY when disabling SDRC DLL
Paul Walmsley [Mon, 15 Jun 2009 08:00:50 +0000 (02:00 -0600)]
OMAP3 SDRC: set FIXEDDELAY when disabling SDRC DLL

Correspondence with the TI OMAP hardware team indicates that
SDRC_DLLA_CTRL.FIXEDDELAY should be initialized to 0x0f.  This number
was apparently derived from process validation.  This is only used
when the SDRC DLL is unlocked (e.g., SDRC clock frequency less than
83MHz).

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3: Add support for DPLL3 divisor values higher than 2
Tero Kristo [Mon, 15 Jun 2009 08:00:49 +0000 (02:00 -0600)]
OMAP3: Add support for DPLL3 divisor values higher than 2

Previously only 1 and 2 was supported. This is needed for DVFS VDD2 control.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
16 years agoOMAP3 SRAM: convert SRAM code to use macros rather than magic numbers
Paul Walmsley [Mon, 15 Jun 2009 08:00:49 +0000 (02:00 -0600)]
OMAP3 SRAM: convert SRAM code to use macros rather than magic numbers

Convert omap3_sram_configure_core_dpll() to use macros rather than
magic numbers.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 SRAM: add more comments on the SRAM code
Paul Walmsley [Mon, 15 Jun 2009 08:00:48 +0000 (02:00 -0600)]
OMAP3 SRAM: add more comments on the SRAM code

Clean up comments and copyrights on the CORE DPLL3 M2 divider change code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 clock/SDRC: program SDRC_MR register during SDRC clock change
Paul Walmsley [Mon, 15 Jun 2009 08:00:44 +0000 (02:00 -0600)]
OMAP3 clock/SDRC: program SDRC_MR register during SDRC clock change

Program the SDRC_MR_0 register as well during SDRC clock changes.
This register allows selection of the memory CAS latency.  Some SDRAM
chips, such as the Qimonda HYB18M512160AF6, have a lower CAS latency
at lower clock rates.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 clock: add a short delay when lowering CORE clk rate
Paul Walmsley [Mon, 15 Jun 2009 08:00:43 +0000 (02:00 -0600)]
OMAP3 clock: add a short delay when lowering CORE clk rate

When changing the SDRAM clock from 166MHz to 83MHz via the CORE DPLL M2
divider, add a short delay before returning to SDRAM to allow the SDRC
time to stabilize.  Without this delay, the system is prone to random
panics upon re-entering SDRAM.

This time delay varies based on MPU frequency.  At 500MHz MPU frequency at
room temperature, 64 loops seems to work okay; so add another 32 loops for
environmental and process variation.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 clock: initialize SDRC timings at kernel start
Paul Walmsley [Mon, 15 Jun 2009 08:00:42 +0000 (02:00 -0600)]
OMAP3 clock: initialize SDRC timings at kernel start

On the OMAP3, initialize SDRC timings when the kernel boots.  This ensures
that the kernel is running with known, optimized SDRC timings, rather than
whatever was configured by the bootloader.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agoOMAP3 clock: remove wait for DPLL3 M2 clock to stabilize
Paul Walmsley [Mon, 15 Jun 2009 08:00:42 +0000 (02:00 -0600)]
OMAP3 clock: remove wait for DPLL3 M2 clock to stabilize

The original CDP kernel that this code comes from waited for 0x800
loops after switching the CORE DPLL M2 divider.  This does not appear
to be necessary.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
16 years agousb: host: introduce ehci-omap driver
Felipe Balbi [Thu, 11 Jun 2009 07:35:52 +0000 (10:35 +0300)]
usb: host: introduce ehci-omap driver

This patch introduces ehci support for omap hardware.

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset drivers/spi/omap2_mcspi.c to mainline
Tony Lindgren [Wed, 10 Jun 2009 15:34:50 +0000 (18:34 +0300)]
REMOVE OMAP LEGACY CODE: Reset drivers/spi/omap2_mcspi.c to mainline

Somehow I missed this file in the previous commit as pointed
out by Kevin.

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset drivers/spi to mainline
Tony Lindgren [Wed, 10 Jun 2009 14:46:22 +0000 (17:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset drivers/spi to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Wed, 10 Jun 2009 13:45:04 +0000 (16:45 +0300)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

16 years agoREMOVE OMAP LEGACY CODE: Reset drivers/net/irda to mainline
Tony Lindgren [Wed, 10 Jun 2009 13:05:21 +0000 (16:05 +0300)]
REMOVE OMAP LEGACY CODE: Reset drivers/net/irda to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMisc fixes to make all boards build
Tony Lindgren [Wed, 10 Jun 2009 11:38:23 +0000 (14:38 +0300)]
Misc fixes to make all boards build

Misc fixes to make all boards build

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset drivers/mtd to mainline
Tony Lindgren [Wed, 10 Jun 2009 11:36:48 +0000 (14:36 +0300)]
REMOVE OMAP LEGACY CODE: Reset drivers/mtd to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years ago[ARM] 5536/1: Move clk_add_alias() to arch/arm/common/clkdev.c
Tony Lindgren [Wed, 3 Jun 2009 16:43:14 +0000 (17:43 +0100)]
[ARM] 5536/1: Move clk_add_alias() to arch/arm/common/clkdev.c

This can be used for other arm platforms too as discussed
on the linux-arm-kernel list.

Also check the return value with IS_ERR and return PTR_ERR
as suggested by Russell King.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agoMerge branch 'iommu' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux...
Tony Lindgren [Wed, 10 Jun 2009 10:23:43 +0000 (13:23 +0300)]
Merge branch 'iommu' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

16 years agoMerge branch 'omapfb-upstream'
Tony Lindgren [Wed, 10 Jun 2009 10:20:48 +0000 (13:20 +0300)]
Merge branch 'omapfb-upstream'

16 years agoMerge branch 'for-next-2.6.30'
Tony Lindgren [Wed, 10 Jun 2009 10:19:13 +0000 (13:19 +0300)]
Merge branch 'for-next-2.6.30'

Conflicts:
arch/arm/mach-omap2/Makefile

16 years agoREMOVE OMAP LEGACY CODE: Reset mach-omap2/Makefile to mainline for board entries
Tony Lindgren [Wed, 10 Jun 2009 09:46:58 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset mach-omap2/Makefile to mainline for board entries

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Remove sti code
Tony Lindgren [Wed, 10 Jun 2009 09:46:58 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Remove sti code

This should be submitted to mainline kernel after removing
the custom ATAG. Patches against the mainline kernel welcome
to add back any missing functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset gpmc.h to mainline
Tony Lindgren [Wed, 10 Jun 2009 09:46:58 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset gpmc.h to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset dma.c to mainline
Tony Lindgren [Wed, 10 Jun 2009 09:46:57 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset dma.c to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Remove omap_type()
Tony Lindgren [Wed, 10 Jun 2009 09:46:57 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Remove omap_type()

Note that the omap_type() prototype is still in cpu.h as it
seems to be in mainline.

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset USB init code to mainline
Tony Lindgren [Wed, 10 Jun 2009 09:46:57 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset USB init code to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset keypad header to mainline
Tony Lindgren [Wed, 10 Jun 2009 09:46:56 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset keypad header to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset serial init code to mainline
Tony Lindgren [Wed, 10 Jun 2009 09:46:56 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset serial init code to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset mmc-twl4030 to mainline
Tony Lindgren [Wed, 10 Jun 2009 09:46:56 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset mmc-twl4030 to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset gpmc-onenand to mainline
Tony Lindgren [Wed, 10 Jun 2009 09:46:56 +0000 (12:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset gpmc-onenand to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset defconfigs to mainline
Tony Lindgren [Tue, 9 Jun 2009 14:39:06 +0000 (17:39 +0300)]
REMOVE OMAP LEGACY CODE: Reset defconfigs to mainline

Reset defconfigs to mainline

Patches against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Remove omap boot tag support
Tony Lindgren [Tue, 9 Jun 2009 12:58:12 +0000 (15:58 +0300)]
REMOVE OMAP LEGACY CODE: Remove omap boot tag support

This is not going to mainline as discussed on linux-arm-kernel
list several times earlier. So far it sounds like we should use
platform_data where possible for passing board data to drivers.

Any boot specific options should be passed via kernel cmdline,
which is the Linux standard. If ATAGs are needed, they should be
ARM generic.

Also using device tree could be explored as discussed in the
linux-arm-kernel list.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Remove twl4030-generic-scripts
Tony Lindgren [Tue, 9 Jun 2009 12:49:55 +0000 (15:49 +0300)]
REMOVE OMAP LEGACY CODE: Remove twl4030-generic-scripts

This code should be submitted to mainline for drivers/mfd changes,
and the related platform_data should be submitted after those
changes.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-zoom to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:47:22 +0000 (15:47 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-zoom to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-overo to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:46:21 +0000 (15:46 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-overo to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-pandora to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:42:32 +0000 (15:42 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-pandora to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-ldp to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:39:58 +0000 (15:39 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-ldp to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-770 to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:38:40 +0000 (15:38 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-770 to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-generic to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:37:48 +0000 (15:37 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-generic to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-h4 to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:36:11 +0000 (15:36 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-h4 to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-*evm* to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:32:04 +0000 (15:32 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-*evm* to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoEMOVE OMAP LEGACY CODE: Reset board-*sdp* to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:27:15 +0000 (15:27 +0300)]
EMOVE OMAP LEGACY CODE: Reset board-*sdp* to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-rx51 to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:23:59 +0000 (15:23 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-rx51 to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-omap3beagle to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:21:10 +0000 (15:21 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-omap3beagle to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset board-apollon to mainline
Tony Lindgren [Tue, 9 Jun 2009 12:18:17 +0000 (15:18 +0300)]
REMOVE OMAP LEGACY CODE: Reset board-apollon to mainline

It's time to start using mainline board-*.c files. Patches
against the mainline kernel welcome to add back any missing
functionality.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Reset omap fb code to mainline
Tony Lindgren [Tue, 9 Jun 2009 11:54:27 +0000 (14:54 +0300)]
REMOVE OMAP LEGACY CODE: Reset omap fb code to mainline

This is to be able to merge in Imre's omapfb-upstream branch.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Remove bluetooth drivers not in mainline
Tony Lindgren [Tue, 9 Jun 2009 11:37:16 +0000 (14:37 +0300)]
REMOVE OMAP LEGACY CODE: Remove bluetooth drivers not in mainline

These should get submitted via linux-bluetooth list. Also the
hwaddress should probably be passable via cmdline, and
OMAP_TAG_NOKIA_BT should be replaces with platform_data.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Remove component-version.c
Tony Lindgren [Tue, 9 Jun 2009 11:29:38 +0000 (14:29 +0300)]
REMOVE OMAP LEGACY CODE: Remove component-version.c

This code should be done in a generic way and the
OMAP_TAG_VERSION_STR should be ARM generic.

Patches against mainline kernel welcome!

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoREMOVE OMAP LEGACY CODE: Remove bootreason.c
Tony Lindgren [Tue, 9 Jun 2009 11:25:42 +0000 (14:25 +0300)]
REMOVE OMAP LEGACY CODE: Remove bootreason.c

This should be handled in a generic way, and the
OMAP_TAG_BOOT_REASON should be ARM common tag.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoLinux 2.6.30 v2.6.30
Linus Torvalds [Wed, 10 Jun 2009 03:05:27 +0000 (20:05 -0700)]
Linux 2.6.30

16 years agochar: mxser, fix ISA board lookup
Peter Botha [Wed, 10 Jun 2009 00:16:32 +0000 (17:16 -0700)]
char: mxser, fix ISA board lookup

There's a bug in the mxser kernel module that still appears in the
2.6.29.4 kernel.

mxser_get_ISA_conf takes a ioaddress as its first argument, by passing the
not of the ioaddr, you're effectively passing 0 which means it won't be
able to talk to an ISA card.  I have tested this, and removing the !
fixes the problem.

Cc: "Peter Botha" <peterb@goldcircle.co.za>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agojbd: fix race in buffer processing in commit code
Jan Kara [Tue, 9 Jun 2009 23:26:26 +0000 (16:26 -0700)]
jbd: fix race in buffer processing in commit code

In commit code, we scan buffers attached to a transaction.  During this
scan, we sometimes have to drop j_list_lock and then we recheck whether
the journal buffer head didn't get freed by journal_try_to_free_buffers().
 But checking for buffer_jbd(bh) isn't enough because a new journal head
could get attached to our buffer head.  So add a check whether the journal
head remained the same and whether it's still at the same transaction and
list.

This is a nasty bug and can cause problems like memory corruption (use after
free) or trigger various assertions in JBD code (observed).

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: <stable@kernel.org>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoautofs4: remove hashed check in validate_wait()
Ian Kent [Tue, 9 Jun 2009 23:26:24 +0000 (16:26 -0700)]
autofs4: remove hashed check in validate_wait()

The recent ->lookup() deadlock correction required the directory inode
mutex to be dropped while waiting for expire completion.  We were
concerned about side effects from this change and one has been identified.

I saw several error messages.

They cause autofs to become quite confused and don't really point to the
actual problem.

Things like:

handle_packet_missing_direct:1376: can't find map entry for (43,1827932)

which is usually totally fatal (although in this case it wouldn't be
except that I treat is as such because it normally is).

do_mount_direct: direct trigger not valid or already mounted
/test/nested/g3c/s1/ss1

which is recoverable, however if this problem is at play it can cause
autofs to become quite confused as to the dependencies in the mount tree
because mount triggers end up mounted multiple times.  It's hard to
accurately check for this over mounting case and automount shouldn't need
to if the kernel module is doing its job.

There was one other message, similar in consequence of this last one but I
can't locate a log example just now.

When checking if a mount has already completed prior to adding a new mount
request to the wait queue we check if the dentry is hashed and, if so, if
it is a mount point.  But, if a mount successfully completed while we
slept on the wait queue mutex the dentry must exist for the mount to have
completed so the test is not really needed.

Mounts can also be done on top of a global root dentry, so for the above
case, where a mount request completes and the wait queue entry has already
been removed, the hashed test returning false can cause an incorrect
callback to the daemon.  Also, d_mountpoint() is not sufficient to check
if a mount has completed for the multi-mount case when we don't have a
real mount at the base of the tree.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoshm: fix unused warnings on nommu
Mike Frysinger [Tue, 9 Jun 2009 23:26:23 +0000 (16:26 -0700)]
shm: fix unused warnings on nommu

The massive nommu update (8feae131) resulted in these warnings:
ipc/shm.c: In function `sys_shmdt':
ipc/shm.c:974: warning: unused variable `size'
ipc/shm.c:972: warning: unused variable `next'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Tue, 9 Jun 2009 15:48:32 +0000 (08:48 -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:
  kvm: fix kvm reboot crash when MAXSMP is used
  cpumask: alloc zeroed cpumask for static cpumask_var_ts
  cpumask: introduce zalloc_cpumask_var

16 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Tue, 9 Jun 2009 15:47:43 +0000 (08:47 -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:
  bsg: setting rq->bio to NULL

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 9 Jun 2009 15:47:27 +0000 (08:47 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  cls_cgroup: Fix oops when user send improperly 'tc filter add' request
  r8169: fix crash when large packets are received

16 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Tue, 9 Jun 2009 15:41:22 +0000 (08:41 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md/raid5: fix bug in reshape code when chunk_size decreases.
  md/raid5 - avoid deadlocks in get_active_stripe during reshape
  md/raid5: use conf->raid_disks in preference to mddev->raid_disk

16 years agobsg: setting rq->bio to NULL
FUJITA Tomonori [Tue, 9 Jun 2009 13:17:37 +0000 (15:17 +0200)]
bsg: setting rq->bio to NULL

Due to commit 1cd96c242a829d52f7a5ae98f554ca9775429685 ("block: WARN
in __blk_put_request() for potential bio leak"), BSG SMP requests get
the false warnings:

WARNING: at block/blk-core.c:1068 __blk_put_request+0x52/0xc0()

This sets rq->bio to NULL to avoid that false warnings.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agokvm: fix kvm reboot crash when MAXSMP is used
Avi Kivity [Sat, 6 Jun 2009 21:52:35 +0000 (14:52 -0700)]
kvm: fix kvm reboot crash when MAXSMP is used

one system was found there is crash during reboot then kvm/MAXSMP
Sending all processes the KILL signal...                              done
Please stand by while rebooting the system...
[ 1721.856538] md: stopping all md devices.
[ 1722.852139] kvm: exiting hardware virtualization
[ 1722.854601] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 1722.872219] IP: [<ffffffff8102c6b6>] hardware_disable+0x4c/0xb4
[ 1722.877955] PGD 0
[ 1722.880042] Oops: 0000 [#1] SMP
[ 1722.892548] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/host0/target0:2:0/0:2:0:0/vendor
[ 1722.900977] CPU 9
[ 1722.912606] Modules linked in:
[ 1722.914226] Pid: 0, comm: swapper Not tainted 2.6.30-rc7-tip-01843-g2305324-dirty #299 ...
[ 1722.932589] RIP: 0010:[<ffffffff8102c6b6>]  [<ffffffff8102c6b6>] hardware_disable+0x4c/0xb4
[ 1722.942709] RSP: 0018:ffffc900010b6ed8  EFLAGS: 00010046
[ 1722.956121] RAX: 0000000000000000 RBX: ffffc9000e253140 RCX: 0000000000000009
[ 1722.972202] RDX: 000000000000b020 RSI: ffffc900010c3220 RDI: ffffffffffffd790
[ 1722.977399] RBP: ffffc900010b6f08 R08: 0000000000000000 R09: 0000000000000000
[ 1722.995149] R10: 00000000000004b8 R11: 966912b6c78fddbd R12: 0000000000000009
[ 1723.011551] R13: 000000000000b020 R14: 0000000000000009 R15: 0000000000000000
[ 1723.019898] FS:  0000000000000000(0000) GS:ffffc900010b3000(0000) knlGS:0000000000000000
[ 1723.034389] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
[ 1723.041164] CR2: 0000000000000000 CR3: 0000000001001000 CR4: 00000000000006e0
[ 1723.056192] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1723.072546] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 1723.080562] Process swapper (pid: 0, threadinfo ffff88107e464000, task ffff88047e5a2550)
[ 1723.096144] Stack:
[ 1723.099071]  0000000000000046 ffffc9000e253168 966912b6c78fddbd ffffc9000e253140
[ 1723.115471]  ffff880c7d4304d0 ffffc9000e253168 ffffc900010b6f28 ffffffff81011022
[ 1723.132428]  ffffc900010b6f48 966912b6c78fddbd ffffc900010b6f48 ffffffff8100b83b
[ 1723.141973] Call Trace:
[ 1723.142981]  <IRQ> <0> [<ffffffff81011022>] kvm_arch_hardware_disable+0x26/0x3c
[ 1723.158153]  [<ffffffff8100b83b>] hardware_disable+0x3f/0x55
[ 1723.172168]  [<ffffffff810b95f6>] generic_smp_call_function_interrupt+0x76/0x13c
[ 1723.178836]  [<ffffffff8104cbea>] smp_call_function_interrupt+0x3a/0x5e
[ 1723.194689]  [<ffffffff81035bf3>] call_function_interrupt+0x13/0x20
[ 1723.199750]  <EOI> <0> [<ffffffff814ad3b4>] ? acpi_idle_enter_c1+0xd3/0xf4
[ 1723.217508]  [<ffffffff814ad3ae>] ? acpi_idle_enter_c1+0xcd/0xf4
[ 1723.232172]  [<ffffffff814ad4bc>] ? acpi_idle_enter_bm+0xe7/0x2ce
[ 1723.235141]  [<ffffffff81a8d93f>] ? __atomic_notifier_call_chain+0x0/0xac
[ 1723.253381]  [<ffffffff818c3dff>] ? menu_select+0x58/0xd2
[ 1723.258179]  [<ffffffff818c2c9d>] ? cpuidle_idle_call+0xa4/0xf3
[ 1723.272828]  [<ffffffff81034085>] ? cpu_idle+0xb8/0x101
[ 1723.277085]  [<ffffffff81a80163>] ? start_secondary+0x1bc/0x1d7
[ 1723.293708] Code: b0 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 e0 31 c0 48 8b 04 cd 30 ee 27 82 49 89 cc 49 89 d5 48 8b 04 10 48 8d b8 90 d7 ff ff <48> 8b 87 70 28 00 00 48 8d 98 90 d7 ff ff eb 16 e8 e9 fe ff ff
[ 1723.335524] RIP  [<ffffffff8102c6b6>] hardware_disable+0x4c/0xb4
[ 1723.342076]  RSP <ffffc900010b6ed8>
[ 1723.352021] CR2: 0000000000000000
[ 1723.354348] ---[ end trace e2aec53dae150aa1 ]---

it turns out that we need clear cpus_hardware_enabled in that case.

Reported-and-tested-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agocpumask: alloc zeroed cpumask for static cpumask_var_ts
Yinghai Lu [Sat, 6 Jun 2009 21:51:36 +0000 (14:51 -0700)]
cpumask: alloc zeroed cpumask for static cpumask_var_ts

These are defined as static cpumask_var_t so if MAXSMP is not used,
they are cleared already.  Avoid surprises when MAXSMP is enabled.

Signed-off-by: Yinghai Lu <yinghai.lu@kernel.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agocpumask: introduce zalloc_cpumask_var
Yinghai Lu [Sat, 6 Jun 2009 21:50:36 +0000 (14:50 -0700)]
cpumask: introduce zalloc_cpumask_var

So can get cpumask_var with cpumask_clear

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agocls_cgroup: Fix oops when user send improperly 'tc filter add' request
Minoru Usui [Tue, 9 Jun 2009 11:03:09 +0000 (04:03 -0700)]
cls_cgroup: Fix oops when user send improperly 'tc filter add' request

I found a bug in cls_cgroup_change() in cls_cgroup.c.
cls_cgroup_change() expected tca[TCA_OPTIONS] was set from user space properly,
but tc in iproute2-2.6.29-1 (which I used) didn't set it.

In the current source code of tc in git, it set tca[TCA_OPTIONS].

  git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git

If we always use a newest iproute2 in git when we use cls_cgroup,
we don't face this oops probably.
But I think, kernel shouldn't panic regardless of use program's behaviour.

Signed-off-by: Minoru Usui <usui@mxm.nes.nec.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agor8169: fix crash when large packets are received
Eric Dumazet [Tue, 9 Jun 2009 11:01:02 +0000 (04:01 -0700)]
r8169: fix crash when large packets are received

Michael Tokarev reported receiving a large packet could crash
a machine with RTL8169 NIC.
( original thread at http://lkml.org/lkml/2009/6/8/192 )

Problem is this driver tells that NIC frames up to 16383 bytes
can be received but provides skb to rx ring allocated with
smaller sizes (1536 bytes in case standard 1500 bytes MTU is used)

When a frame larger than what was allocated by driver is received,
dma transfert can occurs past the end of buffer and corrupt
kernel memory.

Fix is to tell to NIC what is the maximum size a frame can be.

This bug is very old, (before git introduction, linux-2.6.10), and
should be backported to stable versions.

Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoREMOVE OMAP LEGACY CODE: Remove gpio-switch code
Tony Lindgren [Tue, 9 Jun 2009 10:55:05 +0000 (13:55 +0300)]
REMOVE OMAP LEGACY CODE: Remove gpio-switch code

This code is not going to mainline based on earlier comments
on LKML and from David Brownell. For more details, please see:

http://thread.gmane.org/gmane.linux.kernel/809866

So far it looks like the gpio-switch code should be split to
two parts:

- Input events should handled with gpio_keys.c

- Toggling of GPIO values from userspace should be handlled
  via gpiolib

Patches against the mainline kernel are welcome as always!

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agomd/raid5: fix bug in reshape code when chunk_size decreases.
NeilBrown [Tue, 9 Jun 2009 06:32:22 +0000 (16:32 +1000)]
md/raid5: fix bug in reshape code when chunk_size decreases.

Now that we support changing the chunksize, we calculate
"reshape_sectors" to be the max of number of sectors in old
and new chunk size.
However there is one please where we still use 'chunksize'
rather than 'reshape_sectors'.
This causes a reshape that reduces the size of chunks to freeze.

Signed-off-by: NeilBrown <neilb@suse.de>
16 years agomd/raid5 - avoid deadlocks in get_active_stripe during reshape
NeilBrown [Tue, 9 Jun 2009 04:39:59 +0000 (14:39 +1000)]
md/raid5 - avoid deadlocks in get_active_stripe during reshape

md has functionality to 'quiesce' and array so that all pending
IO completed and no new IO starts.  This is used to achieve a
stable state before making internal changes.

Currently this quiescing applies equally to normal IO, resync
IO, and reshape IO.
However there is a problem with applying it to reshape IO.
Reshape can have multiple 'stripe_heads' that must be active together.
If the quiesce come between allocating the first and the last of
such a collection, then we deadlock, as the last will not be allocated
until the quiesce is lifted, the quiesce will not be lifted until the
first (which has been allocated) gets used, and that first cannot be
used until the last is allocated.

It is not necessary to inhibit reshape IO when a quiesce is
requested.  Those places in the code that require a full quiesce will
ensure the reshape thread is not running at all.

So allow reshape requests to get access to new stripe_heads without
being blocked by a 'quiesce'.

This only affects in-place reshapes (i.e. where the array does not
grow or shrink) and these are only newly supported.  So this patch is
not needed in earlier kernels.

Signed-off-by: NeilBrown <neilb@suse.de>
16 years agomd/raid5: use conf->raid_disks in preference to mddev->raid_disk
NeilBrown [Tue, 9 Jun 2009 04:30:31 +0000 (14:30 +1000)]
md/raid5: use conf->raid_disks in preference to mddev->raid_disk

mddev->raid_disks can be changed and any time by a request from
user-space.  It is a suggestion as to what number of raid_disks is
desired.

conf->raid_disks can only be changed by the raid5 module with suitable
locks in place.  It is a statement as to the current number of
raid_disks.

There are two places where the latter should be used, but the former
is used.  This can lead to a crash when reshaping an array.

This patch changes to mddev-> to conf->

Signed-off-by: NeilBrown <neilb@suse.de>
16 years agoasync: Fix lack of boot-time console due to insufficient synchronization
Linus Torvalds [Mon, 8 Jun 2009 19:31:53 +0000 (12:31 -0700)]
async: Fix lack of boot-time console due to insufficient synchronization

Our async work synchronization was broken by "async: make sure
independent async domains can't accidentally entangle" (commit
d5a877e8dd409d8c702986d06485c374b705d340), because it would report
the wrong lowest active async ID when there was both running and
pending async work.

This caused things like no being able to read the root filesystem,
resulting in missing console devices and inability to run 'init',
causing a boot-time panic.

This fixes it by properly returning the lowest pending async ID: if
there is any running async work, that will have a lower ID than any
pending work, and we should _not_ look at the pending work list.

There were alternative patches from Jaswinder and James, but this one
also cleans up the code by removing the pointless 'ret' variable and
the unnecesary testing for an empty list around 'for_each_entry()' (if
the list is empty, the for_each_entry() thing just won't execute).

Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13474
Reported-and-tested-by: Chris Clayton <chris2553@googlemail.com>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Mon, 8 Jun 2009 16:22:53 +0000 (09:22 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: Outline udelay and fix a few issues.
  MIPS: ioctl.h: Fix headers_check warnings
  MIPS: Cobalt: PCI bus is always required to obtain the board ID
  MIPS: Kconfig: Remove "Support for" from Cavium system type
  MIPS: Sibyte: Honor CONFIG_CMDLINE
  SSB: BCM47xx: Export ssb_watchdog_timer_set

16 years agopata_netcell: Fix typo
Alan Cox [Mon, 8 Jun 2009 11:31:00 +0000 (12:31 +0100)]
pata_netcell: Fix typo

The previous patch submission had a I typo I didn't catch but Bartlomiej
noted. Guess this proves the point about any patch being risky late in an rc

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'kvm-updates/2.6.30' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Mon, 8 Jun 2009 16:05:48 +0000 (09:05 -0700)]
Merge branch 'kvm-updates/2.6.30' of git://git./virt/kvm/kvm

* 'kvm-updates/2.6.30' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: Explicity initialize cpus_hardware_enabled

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Mon, 8 Jun 2009 16:04:55 +0000 (09:04 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bart/ide-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  pdc202xx_old: fix resetproc() method
  pdc202xx_old: fix 'pdc20246_dma_ops'

16 years agoMIPS: Outline udelay and fix a few issues.
Ralf Baechle [Sat, 28 Feb 2009 09:44:28 +0000 (09:44 +0000)]
MIPS: Outline udelay and fix a few issues.

Outlining fixes the issue were on certain CPUs such as the R10000 family
the delay loop would need an extra cycle if it overlaps a cacheline
boundary.

The rewrite also fixes build errors with GCC 4.4 which was changed in
way incompatible with the kernel's inline assembly.

Relying on pure C for computation of the delay value removes the need for
explicit.  The price we pay is a slight slowdown of the computation - to
be fixed on another day.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoMIPS: ioctl.h: Fix headers_check warnings
Jaswinder Singh Rajput [Thu, 4 Jun 2009 12:35:49 +0000 (18:05 +0530)]
MIPS: ioctl.h: Fix headers_check warnings

Make ioctl.h compatible with asm-generic/ioctl.h and userspace

fix the following 'make headers_check' warning:

  usr/include/asm-mips/ioctl.h:64: extern's make no sense in userspace

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoMIPS: Cobalt: PCI bus is always required to obtain the board ID
Yoichi Yuasa [Tue, 2 Jun 2009 14:17:07 +0000 (23:17 +0900)]
MIPS: Cobalt: PCI bus is always required to obtain the board ID

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoMIPS: Kconfig: Remove "Support for" from Cavium system type
Yoichi Yuasa [Tue, 2 Jun 2009 14:15:10 +0000 (23:15 +0900)]
MIPS: Kconfig: Remove "Support for" from Cavium system type

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoMIPS: Sibyte: Honor CONFIG_CMDLINE
Ralf Baechle [Tue, 2 Jun 2009 18:05:28 +0000 (19:05 +0100)]
MIPS: Sibyte: Honor CONFIG_CMDLINE

Original patch by Imre Kaloz <kaloz@openwrt.org>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoSSB: BCM47xx: Export ssb_watchdog_timer_set
Matthieu Castet [Fri, 22 May 2009 20:25:04 +0000 (22:25 +0200)]
SSB: BCM47xx: Export ssb_watchdog_timer_set

this patch export ssb_watchdog_timer_set to allow to use it in a Linux
watchdog driver.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Acked-by : Michael Buesch <mb@bu3sch.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 8 Jun 2009 15:29:31 +0000 (08:29 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5543/1: arm: serial amba: add missing declaration in serial.h
  [ARM] pxa: fix pxa27x_udc default pullup GPIO
  [ARM] pxa/imote2: fix UCAM sensor board ADC model number
  mx[23]: don't put clock lookups in __initdata
  fix oops when using console=ttymxcN with N > 0
  [ARM] ARMv7 errata: only apply fixes when running on applicable CPU
  [ARM] 5534/1: kmalloc must return a cache line aligned buffer

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Mon, 8 Jun 2009 14:53:59 +0000 (07:53 -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:
  sdhci-of: Fix the wrong accessor to HOSTVER register
  mvsdio: fix config failure with some high speed SDHC cards
  mvsdio: ignore high speed timing requests from the core
  mmc/omap: Use disable_irq_nosync() from within irq handlers.
  sdhci-of: Add fsl,esdhc as a valid compatible to bind against
  mvsdio: allow automatic loading when modular
  mxcmmc: Fix missing return value checking in DMA setup code.
  mxcmmc : Reset the SDHC hardware if software timeout occurs.
  omap_hsmmc: Trivial fix for a typo in comment
  mxcmmc: decrease minimum frequency to make MMC cards work

16 years agoKVM: Explicity initialize cpus_hardware_enabled
Avi Kivity [Sat, 6 Jun 2009 09:34:39 +0000 (12:34 +0300)]
KVM: Explicity initialize cpus_hardware_enabled

Under CONFIG_MAXSMP, cpus_hardware_enabled is allocated from the heap and
not statically initialized.  This causes a crash on reboot when kvm thinks
vmx is enabled on random nonexistent cpus and accesses nonexistent percpu
lists.

Fix by explicitly clearing the variable.

Cc: stable@kernel.org
Reported-and-tested-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
16 years ago[ARM] 5543/1: arm: serial amba: add missing declaration in serial.h
Alessandro Rubini [Sat, 6 Jun 2009 09:17:57 +0000 (10:17 +0100)]
[ARM] 5543/1: arm: serial amba: add missing declaration in serial.h

This header is sometimes included in the uncompress stage to get
register values, but no <linux/amba/bus.h> can be included there.
So declare "struct amba_device" here before using it in a prototype.

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>