]> pilppa.com Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agoOMAP: Increase VMALLOC_END to allow 256MB RAM
Mans Rullgard [Thu, 2 Oct 2008 08:36:51 +0000 (09:36 +0100)]
OMAP: Increase VMALLOC_END to allow 256MB RAM

This increases VMALLOC_END to 0x18000000, making room for 256MB
RAM with the default 128MB vmalloc region.

Note that after this patch there's no longer a hole between vmalloc
space and the beginning of IO space on omap2 as the first virtual
mapping starts at 0xd8000000.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
16 years agobugfix: SOUND: SOC: OMAP: Add support for Gumstix Overo
David Brownell [Fri, 3 Oct 2008 15:11:33 +0000 (08:11 -0700)]
bugfix: SOUND: SOC: OMAP: Add support for Gumstix Overo

Get rid of bogus ASOC boot messages on non-Overo boards,
such as with a kernel built for both Overo and Beagle.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-By: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c: change twl4030-usb back to subsys_initcall
Felipe Balbi [Fri, 3 Oct 2008 23:50:04 +0000 (02:50 +0300)]
i2c: change twl4030-usb back to subsys_initcall

without it, otg_get/set_transceiver won't be useful and
twl4030-usb transceiver won't get to musb code.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio implements to_irq()
David Brownell [Fri, 3 Oct 2008 16:04:47 +0000 (09:04 -0700)]
twl4030-gpio implements to_irq()

Make twl4030 GPIO support the new gpio_to_irq() hook

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP gpios implement new to_irq()
David Brownell [Fri, 3 Oct 2008 16:04:12 +0000 (09:04 -0700)]
OMAP gpios implement new to_irq()

Make OMAP use the new __gpio_to_irq() hook, to make it easier to
support IRQs coming in from off-chip gpio controllers like the
TWL4030/TPS65930 chip used on OMAP3 boads like Beagleboard.org and
the Gumstix Overo.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agogpiolib to_irq() feature
David Brownell [Fri, 3 Oct 2008 16:02:55 +0000 (09:02 -0700)]
gpiolib to_irq() feature

Add a new gpiolib mechanism:  gpio_chip instances can provide
mappings between their (input) GPIOs and any associated IRQs.
This makes it easier for platforms to support IRQs that are
provided by board-specific external chips instead of as part
of their core (such as SOC-integrated GPIOs).

Also update the irq_to_gpio() description, saying to avoid it
becuase it's not always supported.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-core cleanup
David Brownell [Fri, 3 Oct 2008 16:00:48 +0000 (09:00 -0700)]
twl4030-core cleanup

A variety of twl4030-core cleanups:

 - SIH register declarations moved from core.c to twl4030.h, for
   keypad, madc, bci; this decouples from twl4030-madc.h; add
   several omitted register decls; remove a duplicate.

 - Use a global "inuse" flag, not a per-slave one;

 - Remove pointless SLAVENUM_NUM symbols; just use 0/1/2/3

 - Comments:
     * Add comments:  header, register values
     * Add some section delimiters
     * Correct clock init and other comments

 - Minor stuff:
     * Group some variables and code with sibling
     * Make clock init a bit simpler
     * List twl5030 in supported i2c chips list
     * Remove needless "return;"

And one IRQ-related bugfix:  if the I2C timeout bug strikes while
reading PIH interrupt status, force an immediate retry.  Otherwise
the twl4030 IRQ will never get re-enabled...

Object size shrinks by 180 bytes, w00t!

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoremove <linux/i2c/twl4030-pwrirq.h>
David Brownell [Fri, 3 Oct 2008 16:00:10 +0000 (09:00 -0700)]
remove <linux/i2c/twl4030-pwrirq.h>

Get rid of another needless TWL header file:  twl4030-pwrirq.h
can easily live in twl4030.h; updating its three users.

Also switch to the shared definition of the SIH_CTRL COR bit,
remove useless-to-non-driver MODULE_ALIAS(), and add a note
about a bug that will appear if anyone ever removes this code.

No functional changes, just shrinkage.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoremove <linux/i2c/twl4030-rtc.h>
David Brownell [Fri, 3 Oct 2008 15:59:32 +0000 (08:59 -0700)]
remove <linux/i2c/twl4030-rtc.h>

Remove <linux/i2c/twl4030-rtc.h> by moving all the relevant contents
into the driver itself, and removing the rest.  Stuff removed included
many useless bitmasks, and remnants of the platform data hook.

Add markers inside the rtc driver to split sections apart:  first
data structure declarations, then the RTC driver, then platform bus
glue for it all.

There's still an issue with the twl4030-pwrirq.h registers ... this
driver has no business touching them!  This patch at least switches
away from having private versions of those register definitions, and
removes some unnecessary accesses to them.

No functional changes, just shrinkage.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agortc-twl4030 header cleanup
David Brownell [Fri, 3 Oct 2008 15:58:26 +0000 (08:58 -0700)]
rtc-twl4030 header cleanup

Portability fixes (simplifications) for rtc-twl4030:  don't include
so many needless headers, especially platform-specific ones.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agousb: add back otg_get_transceiver
Felipe Balbi [Fri, 3 Oct 2008 14:15:50 +0000 (17:15 +0300)]
usb: add back otg_get_transceiver

make twl4030_usb transceiver reach musb.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: put DPLL into bypass if bypass rate = clk->rate, not hardware rate
Paul Walmsley [Thu, 25 Sep 2008 14:38:46 +0000 (08:38 -0600)]
OMAP3 clock: put DPLL into bypass if bypass rate = clk->rate, not hardware rate

When a non-CORE DPLL is enabled via omap3_noncore_dpll_enable(), use
the user's desired rate in clk->rate to determine whether to put the
DPLL into bypass or lock mode, rather than reading the DPLL's current
idle state from its hardware registers.

This fixes a bug observed when leaving retention. Non-CORE DPLLs were
not being relocked when downstream clocks re-enabled; rather, the DPLL
entered bypass mode.

Problem reported by Tero Kristo <tero.kristo@nokia.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: fix dss1_alwon_fck
Paul Walmsley [Thu, 25 Sep 2008 14:08:20 +0000 (08:08 -0600)]
OMAP3 clock: fix dss1_alwon_fck

Commit a63efb1547ac35dcb0f007090396a3c7510eb691 broke the dss1_alwon_fck
clock enable on 3430ES2+.  The clock code was not waiting for the module
to come out of idle.

Problem reported by Rajendra Nayak <rnayak@ti.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio.h removal
David Brownell [Thu, 2 Oct 2008 02:48:21 +0000 (19:48 -0700)]
twl4030-gpio.h removal

The <linux/i2c/...> directory has too many headers for twl4030
support.  Start simplifying that by moving twl430-gpio.h into
the main twl4030.h and also:

 - Providing comments to summarize the { module, offset } logical
   addressing vs the { i2c_client, register } physical addressing.

 - Moving the { module, offset } based I/O calls next to the place
   those modules are defined, with slightly improved descriptions.

 - Adding some section markers internal to twl4030.h so unrelated
   things can be visually separated.

 - Move TWL4030_GPIO_MAX adjacent to the other GPIO symbols.

 - Remove two more now-obsolete symbols (for GPIO pullup/pulldown).

 - Have global definitions of the three SIH_CTRL register bits,
   following the pattern of twl4030-core.c (and fixing a minor
   fault handling bug in reading the clear-on-read bit).

To keep things simple, the only blocks with register declarations
in this file should be ones with registers that (cleanly) get
shared between components ... modules with SIH registers (for
IRQ handling) being the obvious candidates.

No functional changes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-core: move to drivers/mfd
David Brownell [Thu, 2 Oct 2008 02:47:54 +0000 (19:47 -0700)]
twl4030-core: move to drivers/mfd

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Move twl4030-core to drivers/mfd from drivers/i2c/chips,
along with its Kconfig and Makefile help.

The intent here is:  no functional change, match the patch
sent to LKML this morning (except, fix that spelling error
in the new Kconfig text).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Fri, 3 Oct 2008 13:19:58 +0000 (16:19 +0300)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

Conflicts:

drivers/usb/musb/musb_core.c

16 years agowatchdog: fix typo in omap_wdt.c
Anand Gadiyar [Fri, 26 Sep 2008 15:50:14 +0000 (21:20 +0530)]
watchdog: fix typo in omap_wdt.c

Fix typo in omap_wdt.c introduced by a recent change

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoCosmetic fixes to sync up with mainline merges
Tony Lindgren [Fri, 3 Oct 2008 10:02:44 +0000 (13:02 +0300)]
Cosmetic fixes to sync up with mainline merges

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP3: DMA: Fix for sDMA Errata 1.113
Santosh Shilimkar [Thu, 25 Sep 2008 10:01:23 +0000 (15:31 +0530)]
ARM: OMAP3: DMA: Fix for sDMA Errata 1.113

SDMA channel is not disabled after transaction error. So explicitly disable it.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked By : Nishant kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030 gpio cleanups
David Brownell [Tue, 30 Sep 2008 19:49:06 +0000 (12:49 -0700)]
twl4030 gpio cleanups

Clean up the twl4030-gpio code a bit ... mostly by shrinkage.

Remove a bunch of macros that are just obfuscating what the
TWL4030 GPIO code is doing.  Some duplicated standard macros
like BIT(); others hid trivial math (mask/shift); others were
completely unused.

Use BIT() in several places to highlight the bitmasking and
make the code more compact.

Remove pointless locking calls, sanity checks, and parenthesis.
And needless irq_chip.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio: beagle pull up/down init
David Brownell [Tue, 30 Sep 2008 18:43:09 +0000 (21:43 +0300)]
twl4030-gpio: beagle pull up/down init

Better TWL init on Beagle:  use the setup() callback to
learn IRQ assignments; and configure pullups/pulldowns.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio: pullup/pulldown init
David Brownell [Tue, 30 Sep 2008 18:43:08 +0000 (21:43 +0300)]
twl4030-gpio: pullup/pulldown init

Finish moving initialization of pullups and pulldowns for twl4030
GPIOs into board specific init.  Remove partial/incorrect init code
for that from the hsmmc glue.

Doing this right requires some attention from board init logic,
based on how the TWL chip is wired.  Letting digital inputs float
will waste power.  Everyone with board schematics should update
their board init code so it matches their boards; meanwhile,
this returns to "current" behavior (all pullups disabled) but
finally offers a way to do it "right".

Note that the ULPI pins won't need this attention (muxed against
gpio{3-5,9-12,14} pins), and neither will ones with external
pullups or pulldowns (conventional for MMC/SD card detect).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-bci: move to new style registration method
Felipe Balbi [Tue, 30 Sep 2008 18:43:07 +0000 (21:43 +0300)]
twl4030-bci: move to new style registration method

twl4030_bci_battery.c is now moved to new style
registration of twl4030 children.

During the process a few bugfixes came, the main one
is that twl4030-bci was releasing the wrong irq if
battery registration had failed.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030: minor cleanups to twl4030_bci_battery.c
Felipe Balbi [Tue, 30 Sep 2008 18:43:06 +0000 (21:43 +0300)]
twl4030: minor cleanups to twl4030_bci_battery.c

Brainless fixes, checkpatch.pl fixes, variable naming,
etc.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-core: portability updates
David Brownell [Tue, 30 Sep 2008 18:43:05 +0000 (21:43 +0300)]
twl4030-core: portability updates

Improve handling of the OMAP-specific setup in twl4030-core,
and remove various warnings on non-OMAP builds.

The main remaining portability problem for this core code (from
a build perspective) is needing symbols like TWL4030_PWR_IRQ_BASE
which are undesirable and platform-specific.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio: irq and other cleanup
David Brownell [Tue, 30 Sep 2008 18:43:04 +0000 (21:43 +0300)]
twl4030-gpio: irq and other cleanup

Remove some ARM and OMAP specific stuff from the twl4030 GPIO code,
and some unused/undesirable CPP symbols.  Add minor checkpatch fixes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio: remove legacy irq triggering calls and user
David Brownell [Tue, 30 Sep 2008 18:43:03 +0000 (21:43 +0300)]
twl4030-gpio: remove legacy irq triggering calls and user

Make the hsmmc code use genirq interfaces to make sure the
card detect IRQ triggers on both edges.  Remove the older
TWL-specific infrastructure for making that happen.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio irq_chip.set_type
David Brownell [Tue, 30 Sep 2008 18:43:02 +0000 (21:43 +0300)]
twl4030-gpio irq_chip.set_type

Make twl4030 GPIO support set_type() request.
Plus a bit of cleanup for the simple functions.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c: minor cleanups to twl4030-pwrbutton.c
Felipe Balbi [Tue, 30 Sep 2008 18:43:01 +0000 (21:43 +0300)]
i2c: minor cleanups to twl4030-pwrbutton.c

Trivial brainless fixes, a few unused headers removed,
changed one printk to pr_err() and removed one comment.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMove I2C driver model init earlier in the boot sequence
David Brownell [Tue, 30 Sep 2008 18:43:00 +0000 (21:43 +0300)]
Move I2C driver model init earlier in the boot sequence

This avoids oopsing in statically linked systems when some
subsystems register I2C drivers in subsys_initcall() code,
but those subsystems are linked (and initialized) before I2C.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c: switch twl4030-usb to use a resource for irq
Felipe Balbi [Tue, 30 Sep 2008 18:42:59 +0000 (21:42 +0300)]
i2c: switch twl4030-usb to use a resource for irq

use platform_get_irq() for getting irq number passed
to twl4030-usb via twl4030-core.c:add_children()

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agominor irq-related cleanups
David Brownell [Tue, 30 Sep 2008 18:42:58 +0000 (21:42 +0300)]
minor irq-related cleanups

Minor IRQ-related cleanups:  comment out the no-longer-used
GPIO irq symbol (more to come, eventually); create RTC IRQ
resource; and use that RTC IRQ resource.

And incidentally, make the RTC code free the correct IRQ;
it was pretty goofed up...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c: added a few missing gotos to add_children()
Felipe Balbi [Tue, 30 Sep 2008 18:42:57 +0000 (21:42 +0300)]
i2c: added a few missing gotos to add_children()

Previously we were failing platform_device_add_data()
and returning from add_children but trying to keep going
when platform_device_add() fails.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agomove twl4030-gpio to drivers/gpio
David Brownell [Tue, 30 Sep 2008 18:42:56 +0000 (21:42 +0300)]
move twl4030-gpio to drivers/gpio

Move the twl4030 GPIO support from drivers/i2c/chips to drivers/gpio,
which is a more appropriate home for this code.

The Kconfig symbol name is changed to match the GPIO_* convention for
such symbols, so config files must change in the obvious ways (Kconfig
will prompt you).  There's now some helptext.

It can now be compiled as a module, should anyone really want to
do that; that'll be mostly useful for test builds.  Sanity check the
IRQ range we're given.

Initialization order needed a bit of work too:  core add_children()
called only after IRQs get set up, gpio uses subsys_initcall.  This
depends on a patch making i2c driver model init use postcore_initcall.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoprovide detailed diagnostics in add_children()
David Brownell [Tue, 30 Sep 2008 18:42:55 +0000 (21:42 +0300)]
provide detailed diagnostics in add_children()

Provide detailed diagnostics in add_children() when DEBUG is
defined ... and fix the non-DEBUG message to include minimal
status, and not appear unless there was actually an error.

Update the IRQ message; have it match what the GPIO subchip
says, and as a precaution, make it only appear if the IRQs
have been initialized.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Added a few more diagnostics when platform_device_add() fails.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agominor twl4030-core cleanups
David Brownell [Tue, 30 Sep 2008 18:42:54 +0000 (21:42 +0300)]
minor twl4030-core cleanups

Minor twl4030-core cleanups:  alphabetize the creation of the
new sub-function nodes; wrap an #if around the OMAP-only part
(to get more general build testing when this goes upstream);
remove reference to undocumented "twl3040" variant.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Moved gpio before keypad driver due to alphabetic order.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c: move twl4030-madc to new registration style
Felipe Balbi [Tue, 30 Sep 2008 18:42:53 +0000 (21:42 +0300)]
i2c: move twl4030-madc to new registration style

Moving twl4030-madc to new style registration just like
the other twl4030 children.

Cc: Mikko Ylinen <mikko.k.ylinen@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030 uses gpiolib
David Brownell [Tue, 30 Sep 2008 18:42:52 +0000 (21:42 +0300)]
twl4030 uses gpiolib

Make the twl4030 core create a platform device to which its
GPIO code will bind, with platform_data used to configure
board-specific behaviors and configuration.

Update the twl4030 GPIO code:

  - Morph its gpio function code into a platform driver.

  - Move away from IRQ (and GPIO) numbers hard-wired in headers.

  - Hook up the twl4030 GPIO code to gpiolib.

  - Start phasing out the older TWL-specific calls ... currently
    those are used only by arch/arm/mach-omap2/hsmmc.c setup code.

  - Use a mutex for locking, not a binary semaphore.

NOTE:  more patches pending:  (a) this doesn't use pdata->pullups
to initialize (currently hsmmc code always sets GPIO-0 pullup even
if the board has an external pullup);  (b) there's a new gpio
request/free hook forthcoming in 2.6.28, which this should use;
(c) likewise there's a new gpio_to_irq() hook; (d) the irq_chip
set_type() mechanism needs to be supported; (e) needs to move over
to drivers/gpio; (f) upcoming threaded IRQ infrastructure should
be used, when that merges.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030 gpio platform data
David Brownell [Tue, 30 Sep 2008 18:42:51 +0000 (21:42 +0300)]
twl4030 gpio platform data

Define platform data for configuring TWL4030 GPIOs,
and provide it for all boards using these chips.

For now all boards use the same fixed assignments for
GPIO and IRQ numbers.  Eventually we should be able
to shuffle them without changing platform headers.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c: twl4030-usb: add 'vbus' sysfs file
Felipe Balbi [Tue, 30 Sep 2008 18:42:50 +0000 (21:42 +0300)]
i2c: twl4030-usb: add 'vbus' sysfs file

vbus sysfs file will report the state of vbus irq coming from
twl4030-usb.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c: move twl4030-usb to platform_device
Felipe Balbi [Tue, 30 Sep 2008 18:42:49 +0000 (21:42 +0300)]
i2c: move twl4030-usb to platform_device

use new style twl4030-core to register a platform_device
for twl4030-usb.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c: move twl4030_keypad to new style registration
Felipe Balbi [Tue, 30 Sep 2008 18:42:48 +0000 (21:42 +0300)]
i2c: move twl4030_keypad to new style registration

let twl4030-core.c take care of twl4030_keypad registration.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c: clean add_children a bit
Felipe Balbi [Tue, 30 Sep 2008 18:42:47 +0000 (21:42 +0300)]
i2c: clean add_children a bit

Clean up add_children a bit before adding more children
to twl4030-core.c

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio: Remove default pullup enable/disable of GPIO
Jagadeesh Bhaskar Pakaravoor [Tue, 30 Sep 2008 18:42:46 +0000 (21:42 +0300)]
twl4030-gpio: Remove default pullup enable/disable of GPIO

One twl4030_request_gpio() should not tamper with the pullup
enabling/disabling of the rest of the GPIOs. So removing the default
pullup values written to REG_GPIOPUPDCTR1.

Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Girish S G <girishsg@ti.com>
Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030: fix potential null pointer dereference
Felipe Balbi [Tue, 30 Sep 2008 18:42:45 +0000 (21:42 +0300)]
twl4030: fix potential null pointer dereference

The following patch fix a potential null pointer
dereference in twl4030 keypad driver when parts
of keypad platform_data aren't passed down to the
driver. At that point kp->dbg_dev is not set yet.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Get rid of controller vs slot confusion, initialize MMC devices dynamicall...
Tony Lindgren [Tue, 30 Sep 2008 12:52:57 +0000 (15:52 +0300)]
ARM: OMAP: Get rid of controller vs slot confusion, initialize MMC devices dynamically, v2

Big MMC init clean up:

- Remove enabled field from slots. It is really intended to mean enabled controller,
  not enabled slot. Some controllers can have multiple multiplexed slots connected
  to the first controller, such as H4 and N8X0.

- Initialize MMC devices dynamically as suggested by Russell King

- Fix omap1 and omap2 mmc clock instance numbers

- Also attempt to fix massive omap1 MMC breakage caused by patch
  138ab9f8321f67c71984ca43222efa71b0a0a0a9. Remove obviously broken
  MMC configurations for now. MMC is still not working for any
  omap1 boards.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoLinux 2.6.27-rc8 v2.6.27-rc8
Linus Torvalds [Mon, 29 Sep 2008 22:24:02 +0000 (15:24 -0700)]
Linux 2.6.27-rc8

16 years agomm owner: fix race between swapoff and exit
Balbir Singh [Sun, 28 Sep 2008 22:09:31 +0000 (23:09 +0100)]
mm owner: fix race between swapoff and exit

There's a race between mm->owner assignment and swapoff, more easily
seen when task slab poisoning is turned on.  The condition occurs when
try_to_unuse() runs in parallel with an exiting task.  A similar race
can occur with callers of get_task_mm(), such as /proc/<pid>/<mmstats>
or ptrace or page migration.

CPU0                                    CPU1
                                        try_to_unuse
                                        looks at mm = task0->mm
                                        increments mm->mm_users
task 0 exits
mm->owner needs to be updated, but no
new owner is found (mm_users > 1, but
no other task has task->mm = task0->mm)
mm_update_next_owner() leaves
                                        mmput(mm) decrements mm->mm_users
task0 freed
                                        dereferencing mm->owner fails

The fix is to notify the subsystem via mm_owner_changed callback(),
if no new owner is found, by specifying the new task as NULL.

Jiri Slaby:
mm->owner was set to NULL prior to calling cgroup_mm_owner_callbacks(), but
must be set after that, so as not to pass NULL as old owner causing oops.

Daisuke Nishimura:
mm_update_next_owner() may set mm->owner to NULL, but mem_cgroup_from_task()
and its callers need to take account of this situation to avoid oops.

Hugh Dickins:
Lockdep warning and hang below exec_mmap() when testing these patches.
exit_mm() up_reads mmap_sem before calling mm_update_next_owner(),
so exec_mmap() now needs to do the same.  And with that repositioning,
there's now no point in mm_need_new_owner() allowing for NULL mm.

Reported-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 29 Sep 2008 15:39:59 +0000 (08:39 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: disable apm on the olpc

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Mon, 29 Sep 2008 15:37:29 +0000 (08:37 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  cdrom: update ioctl documentation
  ide: note that IDE generic may prevent other drivers from attaching
  ide-tape: fix vendor strings
  Swarm: Fix crash due to missing initialization

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Mon, 29 Sep 2008 15:31:52 +0000 (08:31 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [SSB] Initialise dma_mask for SSB_BUSTYPE_SSB devices
  [MIPS] BCM47xx: Fix build error due to missing PCI functions
  [MIPS] IP27: Switch to dynamic interrupt routing avoding panic on error.
  [MIPS] au1000: Make sure GPIO value is zero or one

16 years agoMerge branch 'linux-m32r' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
Linus Torvalds [Mon, 29 Sep 2008 15:30:47 +0000 (08:30 -0700)]
Merge branch 'linux-m32r' of git://www.linux-m32r.org/git/takata/linux-2.6_dev

* 'linux-m32r' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
  m32r/kernel/: cleanups
  m32r: export __ndelay
  m32r: export empty_zero_page
  m32r: don't offer CONFIG_ISA
  m32r: remove the unused NOHIGHMEM option

16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
Linus Torvalds [Mon, 29 Sep 2008 15:30:11 +0000 (08:30 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
  kgdboc,tty: Fix tty polling search to use name correctly
  kgdb, x86_64: fix PS CS SS registers in gdb serial
  kgdb, x86_64: gdb serial has BX and DX reversed
  kgdb, x86, arm, mips, powerpc: ignore user space single stepping
  kgdb: could not write to the last of valid memory with kgdb

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 29 Sep 2008 15:08:16 +0000 (08:08 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ASoC: Fix another cs4270 error path
  ALSA: make the CS4270 driver a new-style I2C driver

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Mon, 29 Sep 2008 15:07:46 +0000 (08:07 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] qlogicpti: fix sg list traversal error in continuation entries
  [SCSI] Fix hang with split requests
  [SCSI] qla2xxx: Defer enablement of RISC interrupts until ISP initialization completes.

16 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Mon, 29 Sep 2008 15:07:04 +0000 (08:07 -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:
  scsi: fix fall out of sg-chaining patch in qlogicpti

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Mon, 29 Sep 2008 15:05:55 +0000 (08:05 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_nv: reinstate nv_hardreset() for non generic controllers

16 years agokconfig: readd lost change count
zippel@linux-m68k.org [Mon, 29 Sep 2008 03:27:11 +0000 (05:27 +0200)]
kconfig: readd lost change count

Commit f072181e6403b0fe2e2aa800a005497b748fd284 ("kconfig: drop the
""trying to assign nonexistent symbol" warning") simply dropped the
warnings, but it does a little more than that, it also marks the current
.config as needed saving, so add this back.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokconfig: fix silentoldconfig
zippel@linux-m68k.org [Mon, 29 Sep 2008 03:27:10 +0000 (05:27 +0200)]
kconfig: fix silentoldconfig

Recent changes to oldconfig have mixed up the silentoldconfig handling,
so this fixes that by clearly separating that special mode, e.g.
KCONFIG_NOSILENTUPDATE is only relevant here, the .config is written as
needed.

This will also properly close Bug 11230.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix NULL pointer dereference in proc_sys_compare
Linus Torvalds [Mon, 29 Sep 2008 14:42:57 +0000 (07:42 -0700)]
Fix NULL pointer dereference in proc_sys_compare

The VFS interface for the 'd_compare()' is a bit special (read: 'odd'),
because it really just essentially replaces a memcmp().  The filesystem
is supposed to just compare the two names with whatever case-independent
or other function.

And when I say 'is supposed to', I obviously mean that 'procfs does odd
things, and actually looks at the dentry that we don't even pass down,
rather than just the name'.  Which results in problems, because we
actually call d_compare before we have even verified that the dentry is
still hashed at all.

And that causes a problm since the inode that procfs looks at may have
been free'd and the d_inode pointer is NULL.  procfs just assumes that
all dentries are positive, since procfs itself never generates a
negative one.  But memory pressure will still result in the dentry
getting torn down, and as it is removed by RCU, it still remains visible
on some lists - and to d_compare.

If the filesystem just did a name comparison, we wouldn't care.  And we
could just fix procfs to know about negative dentries too.  But rather
than have the low-level filesystems know about internal VFS details,
just move the check for a unhashed dentry up a bit, so that we will only
call d_compare on dentries that are still active.

The actual oops this caused didn't look like a NULL pointer dereference
because procfs did a 'container_of(inode, struct proc_inode, vfs_inode)'
to get at its internal proc_inode information from the inode pointer,
and accessed a field below the inode. So the oops would look something
like

BUG: unable to handle kernel paging request at fffffffffffffff0
IP: [<ffffffff802bc6c6>] proc_sys_compare+0x36/0x50

and was seen on both x86-64 (Alexey Dobriyan and Hugh Dickins) and
ppc64 (Hugh Dickins).

Reported-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoALSA: ASoC: Fix another cs4270 error path
Jean Delvare [Sat, 27 Sep 2008 18:30:52 +0000 (20:30 +0200)]
ALSA: ASoC: Fix another cs4270 error path

Conversion to new-style i2c driver missed the error path of the
probe function. Fix it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: make the CS4270 driver a new-style I2C driver
Timur Tabi [Tue, 29 Jul 2008 21:35:52 +0000 (16:35 -0500)]
ALSA: make the CS4270 driver a new-style I2C driver

Update the CS4270 ALSA device driver to use the new-style I2C interface.
Starting with the 2.6.27 PowerPC kernel, I2C devices that have entries in the
device trees can no longer be probed by old-style I2C drivers.  The device
tree for Freescale MPC8610 HPCD has included an entry for the CS4270 since
2.6.25, but that entry was previously ignored by the PowerPC I2C subsystem.
Since that's no longer the case, the best solution is to update the CS4270
driver to a new-style interface, rather than try to revert the behavior of
new PowerPC I2C subsystem.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoscsi: fix fall out of sg-chaining patch in qlogicpti
Boaz Harrosh [Mon, 29 Sep 2008 07:38:55 +0000 (09:38 +0200)]
scsi: fix fall out of sg-chaining patch in qlogicpti

Boaz writes:

"I've reviewed all patches since Matthew's, and I find one small
problem.

In the load_cmd() there is a compound loop where the first 4 sg's are
set then the rest are set into a memory structure in group of 7 sg's.

Well the second 7-group and on is a bug because sg pointer does not advance.
This is a fall out from Jens's patch."

The reporter, Meelis Roos <mroos@ut.ee>, verified that this patch
does indeed fix his problem with qlogicpti.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agosata_nv: reinstate nv_hardreset() for non generic controllers
Tejun Heo [Sat, 27 Sep 2008 22:39:01 +0000 (07:39 +0900)]
sata_nv: reinstate nv_hardreset() for non generic controllers

Commit 2fd673ecf0378ddeeeb87b3605e50212e0c0ddc6 which tried to remove
hardreset for generic accidentally removed it for all flavors as all
others were inheriting from nv_generic_ops.  This patch reinstates
nv_hardreset() and puts it into nv_common_ops which all flavors
inherit from.  nv_generic_ops now inherits from nv_common_ops and
overrides .hardreset to ATA_OP_NULL.

While at it, explain why nv_hardreset and ATA_OP_NULL override are
necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[SCSI] qlogicpti: fix sg list traversal error in continuation entries
Boaz Harrosh [Wed, 24 Sep 2008 09:00:22 +0000 (12:00 +0300)]
[SCSI] qlogicpti: fix sg list traversal error in continuation entries

The current sg list traversal logic for the continuation entries
doesn't advance the list pointer once all seven slots are used, so the
next continuation entry (if there is one) wrongly begins again at the
start of the sg list.

Fix by advancing the sg pointer after the for_each_sg().

Reported-by: Meelis Roos <mroos@ut.ee>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoRevert "ARM: OMAP: Get rid of controller vs slot confusion, initialize MMC devices...
Tony Lindgren [Sun, 28 Sep 2008 12:42:17 +0000 (15:42 +0300)]
Revert "ARM: OMAP: Get rid of controller vs slot confusion, initialize MMC devices dynamically"

This reverts commit c434c15d28c82d92e55897bd265c423e9ab69362.

Will re-apply once the MMC breakage on 3430 has been sorted out.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agocdrom: update ioctl documentation
Márton Németh [Sat, 27 Sep 2008 17:32:17 +0000 (19:32 +0200)]
cdrom: update ioctl documentation

Correct copy-paste problem: CDROMCLOSETRAY is about closing the tray,
not opening it.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: note that IDE generic may prevent other drivers from attaching
Tejun Heo [Sat, 27 Sep 2008 17:32:17 +0000 (19:32 +0200)]
ide: note that IDE generic may prevent other drivers from attaching

Enabling IDE generic may prevent ATA controllers located on legacy
ports from being attached to more proper driver or can prevent other
controllers which share the IRQ from working.  Note it in the help
message.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: xerces8 <xerces8@butn.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: stein@hermes.si
[bart: s/will grab/may grab/ since Borislav has fixed PCI-case for .28]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: fix vendor strings
Borislav Petkov [Sat, 27 Sep 2008 17:32:17 +0000 (19:32 +0200)]
ide-tape: fix vendor strings

Remove superfluous two bytes from each string buffer and add proper length
format specifiers.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Tested-by: Mark de Wever <koraq@xs4all.nl>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoSwarm: Fix crash due to missing initialization
Ralf Baechle [Sat, 27 Sep 2008 17:32:16 +0000 (19:32 +0200)]
Swarm: Fix crash due to missing initialization

If things are just right this will result in the hws[0]->parent being
passed to ide_host_add() being non-zero and an ooops a little later.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years ago[SSB] Initialise dma_mask for SSB_BUSTYPE_SSB devices
Aurelien Jarno [Fri, 26 Sep 2008 20:27:11 +0000 (22:27 +0200)]
[SSB] Initialise dma_mask for SSB_BUSTYPE_SSB devices

For SSB_BUSTYPE_SSB type devices, we need to initialize dma_mask using
coherent_dma_mask so that calls to dma_set_mask() succeed.

It fixes the regression on the b44 driver introduced by commit
f225763a7d6c92c4932dbd528437997078496fcc

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] BCM47xx: Fix build error due to missing PCI functions
Aurelien Jarno [Sat, 27 Sep 2008 14:06:16 +0000 (16:06 +0200)]
[MIPS] BCM47xx: Fix build error due to missing PCI functions

This patch defines pcibios_map_irq() and pcibios_plat_dev_init() for
the BCM47xx platform.

It fixes the regression introduced by commit
aab547ce0d1493d400b6468c521a0137cd8c1edf.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP27: Switch to dynamic interrupt routing avoding panic on error.
Ralf Baechle [Sat, 27 Sep 2008 14:05:06 +0000 (15:05 +0100)]
[MIPS] IP27: Switch to dynamic interrupt routing avoding panic on error.

pcibios_map_irq is no way of returning an error but on IP27 an interrupt
is possibly not routable when running out of resources.  So do the
interrupt routing at pcibios_enable_device time.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] au1000: Make sure GPIO value is zero or one
Bruno Randolf [Thu, 25 Sep 2008 14:45:10 +0000 (16:45 +0200)]
[MIPS] au1000: Make sure GPIO value is zero or one

David Brownell <david-b@pacbell.net> wrote:
>       The problem is that "value" is zero-or-nonzero.
>       This code wrongly assumes it's zero-or-one.
>       Possible fix:  "((!!value) << gpio)".

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agom32r/kernel/: cleanups
Adrian Bunk [Wed, 24 Sep 2008 06:01:47 +0000 (15:01 +0900)]
m32r/kernel/: cleanups

This patch contains the following cleanups:
- make the following needlessly global code static:
  - entry.S: resume_userspace
  - process.c: pm_idle
  - process.c: default_idle()
  - smp.c: send_IPI_allbutself()
  - time.c: timer_interrupt()
  - time.c: struct irq0
  - traps.c: set_eit_vector_entries()
  - traps.c: kstack_depth_to_print
  - traps.c: show_trace()
  - traps.c: die_lock
- remove the following unused code:
  - head.S: startup_32
  - process.c: hlt_counter
  - process.c: disable_hlt()
  - process.c: enable_hlt()
  - process.c: dump_task_regs()
- remove the following variables and their usages since they were
  always 0:
  - irq.c: irq_err_count
  - irq.c: irq_mis_count

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
16 years agom32r: export __ndelay
Adrian Bunk [Wed, 24 Sep 2008 06:01:15 +0000 (15:01 +0900)]
m32r: export __ndelay

ERROR: "__ndelay" [drivers/spi/spi_bitbang.ko] undefined!

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
16 years agom32r: export empty_zero_page
Adrian Bunk [Wed, 24 Sep 2008 05:59:57 +0000 (14:59 +0900)]
m32r: export empty_zero_page

ERROR: "empty_zero_page" [fs/ext4/ext4dev.ko] undefined!

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
16 years agom32r: don't offer CONFIG_ISA
Adrian Bunk [Wed, 24 Sep 2008 05:58:54 +0000 (14:58 +0900)]
m32r: don't offer CONFIG_ISA

As far as I know no M32R hardware actually has ISA slots.

And ISA drivers don't compile on M32R.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
16 years agom32r: remove the unused NOHIGHMEM option
Adrian Bunk [Wed, 24 Sep 2008 05:57:11 +0000 (14:57 +0900)]
m32r: remove the unused NOHIGHMEM option

Remove the unused NOHIGHMEM option.

Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 26 Sep 2008 16:16:32 +0000 (09:16 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: remove unneeded power_mutex lock in snd_pcm_drop
  ALSA: fix locking in snd_pcm_open*() and snd_rawmidi_open*()

16 years agoMerge git://oss.sgi.com:8090/xfs/linux-2.6
Linus Torvalds [Fri, 26 Sep 2008 15:49:34 +0000 (08:49 -0700)]
Merge git://oss.sgi.com:8090/xfs/linux-2.6

* git://oss.sgi.com:8090/xfs/linux-2.6:
  [XFS] Remove xfs_iext_irec_compact_full()
  [XFS] Fix extent list corruption in xfs_iext_irec_compact_full().

16 years agoARM: Delete ARM's own cnt32_to_63.h
David Howells [Fri, 26 Sep 2008 15:22:58 +0000 (16:22 +0100)]
ARM: Delete ARM's own cnt32_to_63.h

Delete ARM's own cnt32_to_63.h as the copy in include/linux/ should now be
used instead.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokgdboc,tty: Fix tty polling search to use name correctly
Jason Wessel [Fri, 26 Sep 2008 15:36:42 +0000 (10:36 -0500)]
kgdboc,tty: Fix tty polling search to use name correctly

The tty_find_polling_driver() routine did not correctly check the base
part of the tty name.  This can lead to kgdboc selecting an incorrect
driver, as well as accepting a completely invalid tty such as "echo
ffff0 > /sys/module/kgdboc/parameters/kgdboc".

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agokgdb, x86_64: fix PS CS SS registers in gdb serial
Jason Wessel [Fri, 26 Sep 2008 15:36:42 +0000 (10:36 -0500)]
kgdb, x86_64: fix PS CS SS registers in gdb serial

On x86_64 the gdb serial register structure defines the PS (also known
as eflags), CS and SS registers as 4 bytes entities.

This patch splits the x86_64 regnames enum into a 32 and 64 version to
account for the 32 bit entities in the gdb serial packets.

Also the program counter is properly filled in for the sleeping
threads.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agokgdb, x86_64: gdb serial has BX and DX reversed
Jason Wessel [Fri, 26 Sep 2008 15:36:42 +0000 (10:36 -0500)]
kgdb, x86_64: gdb serial has BX and DX reversed

The BX and DX registers in the gdb serial register packet need to be
flipped for gdb to receive the correct data.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agokgdb, x86, arm, mips, powerpc: ignore user space single stepping
Jason Wessel [Fri, 26 Sep 2008 15:36:41 +0000 (10:36 -0500)]
kgdb, x86, arm, mips, powerpc: ignore user space single stepping

On the x86 arch, user space single step exceptions should be ignored
if they occur in the kernel space, such as ptrace stepping through a
system call.

First check if it is kgdb that is executing a single step, then ensure
it is not an accidental traversal into the user space, while in kgdb,
any other time the TIF_SINGLESTEP is set, kgdb should ignore the
exception.

On x86, arm, mips and powerpc, the kgdb_contthread usage was
inconsistent with the way single stepping is implemented in the kgdb
core.  The arch specific stub should always set the
kgdb_cpu_doing_single_step correctly if it is single stepping.  This
allows kgdb to correctly process an instruction steps if ptrace
happens to be requesting an instruction step over a system call.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agokgdb: could not write to the last of valid memory with kgdb
Atsuo Igarashi [Fri, 26 Sep 2008 15:36:41 +0000 (10:36 -0500)]
kgdb: could not write to the last of valid memory with kgdb

On the ARM architecture, kgdb will crash the kernel if the last byte
of valid memory is written due to a flush_icache_range flushing
beyond the memory boundary.

Signed-off-by: Atsuo Igarashi <atsuo_igarashi@tripeaks.co.jp>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agoMerge branch 'linux-next' of git://git.infradead.org/~dedekind/ubifs-2.6
Linus Torvalds [Fri, 26 Sep 2008 15:20:26 +0000 (08:20 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubifs-2.6

* 'linux-next' of git://git.infradead.org/~dedekind/ubifs-2.6:
  UBIFS: fix printk format warnings
  UBIFS: remove incorrect assert
  UBIFS: TNC / GC race fixes
  UBIFS: create the name of the background thread in every case

16 years ago[XFS] Remove xfs_iext_irec_compact_full()
Lachlan McIlroy [Fri, 26 Sep 2008 02:17:57 +0000 (12:17 +1000)]
[XFS] Remove xfs_iext_irec_compact_full()

Yet another bug was found in xfs_iext_irec_compact_full() and while the
source of the bug was found it wasn't an easy task to track it down
because the conditions are very difficult to reproduce.

A HUGE thank-you goes to Russell Cattelan and Eric Sandeen for their
significant effort in tracking down the source of this corruption.

xfs_iext_irec_compact_full() and xfs_iext_irec_compact_pages() are almost
identical - they both compact indirect extent lists by moving extents from
subsequent buffers into earlier ones. xfs_iext_irec_compact_pages() only
moves extents if all of the extents in the next buffer will fit into the
empty space in the buffer before it. xfs_iext_irec_compact_full() will go
a step further and move part of the next buffer if all the extents wont
fit. It will then shift the remaining extents in the next buffer up to the
start of the buffer. The bug here was that we did not update er_extoff and
this caused extent list corruption.

It does not appear that this extra functionality gains us much. Calling
xfs_iext_irec_compact_pages() instead will do a good enough job at
compacting the indirect list and will be quicker too.

For the case in xfs_iext_indirect_to_direct() the total number of extents
in the indirect list will fit into one buffer so we will never need the
extra functionality of xfs_iext_irec_compact_full() there.

Also xfs_iext_irec_compact_pages() doesn't need to do a memmove() (the
buffers will never overlap) so we don't want the performance hit that can
incur.

SGI-PV: 987159

SGI-Modid: xfs-linux-melb:xfs-kern:32166a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
16 years ago[XFS] Fix extent list corruption in xfs_iext_irec_compact_full().
Lachlan McIlroy [Fri, 26 Sep 2008 02:16:46 +0000 (12:16 +1000)]
[XFS] Fix extent list corruption in xfs_iext_irec_compact_full().

If we don't move all the records from the next buffer into the current
buffer then we need to update the er_extoff field of the next buffer as we
shift the remaining records to the start of the buffer.

SGI-PV: 987159

SGI-Modid: xfs-linux-melb:xfs-kern:32165a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Russell Cattelan <cattelan@thebarn.com>
16 years agoIPoIB: Fix crash when path record fails after path flush
Roland Dreier [Thu, 25 Sep 2008 22:28:08 +0000 (15:28 -0700)]
IPoIB: Fix crash when path record fails after path flush

Commit ee1e2c82 ("IPoIB: Refresh paths instead of flushing them on SM
change events") changed how paths are flushed on an SM event.  This
change introduces a problem if the path record query triggered by
fails, causing path->ah to become NULL.  A later successful path query
will then trigger WARN_ON() in path_rec_completion(), and crash
because path->ah has already been freed, so the ipoib_put_ah() inside
the lock in path_rec_completion() may actually drop the last reference
(contrary to the comment that claims this is safe).

Fix this by updating path->ah and freeing old_ah only when the path
record query is successful.  This prevents the neighbour AH and that
path AH from getting out of sync.

This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=1194>

Reported-by: Rabah Salem <ravah@mellanox.com>
Debugged-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoALSA: remove unneeded power_mutex lock in snd_pcm_drop
Takashi Iwai [Thu, 25 Sep 2008 15:51:11 +0000 (17:51 +0200)]
ALSA: remove unneeded power_mutex lock in snd_pcm_drop

The power_mutex lock in snd_pcm_drop may cause a possible deadlock
chain, and above all, it's unneeded.  Let's get rid of it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoI2C: Remove old zero byte hack
Tony Lindgren [Thu, 25 Sep 2008 13:58:44 +0000 (16:58 +0300)]
I2C: Remove old zero byte hack

This should not be needed with new style I2C drivers.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-core: cleanups
David Brownell [Thu, 25 Sep 2008 07:33:57 +0000 (00:33 -0700)]
twl4030-core: cleanups

A bunch of little cleanups to twl4030-core.

 - Remove needless header inclusions, symbols, and
   forward declarations.

 - Make coding style more standard.

And shrink the object size a bit.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agosome drivers switch away from OMAP-specific GPIO calls
David Brownell [Thu, 25 Sep 2008 02:35:56 +0000 (19:35 -0700)]
some drivers switch away from OMAP-specific GPIO calls

This updates most of the OMAP drivers which are in mainline to
switch to using the cross-platform GPIO calls instead of the
older OMAP-specific ones.

This is all fairly brainless/obvious stuff.  Probably the
most interesting bit is to observe that the omap-keypad
code seems to now have a portable core that could work with
non-OMAP matrix keypads.  (That would improve with hardware
IRQ debouncing enabled, of course...)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoALSA: fix locking in snd_pcm_open*() and snd_rawmidi_open*()
Takashi Iwai [Thu, 25 Sep 2008 12:51:03 +0000 (14:51 +0200)]
ALSA: fix locking in snd_pcm_open*() and snd_rawmidi_open*()

The PCM and rawmidi open callbacks have a lock against card->controls_list
but it takes a wrong one, card->controls_rwsem, instead of a right one
card->ctl_files_rwlock.  This patch fixes them.

This change also fixes automatically the potential deadlocks due to
mm->mmap_sem in munmap and copy_from/to_user, reported by Sitsofe
Wheeler:

  A: snd_ctl_elem_user_tlv(): card->controls_rwsem => mm->mmap_sem
  B: snd_pcm_open(): card->open_mutex => card->controls_rwsem
  C: munmap: mm->mmap_sem => snd_pcm_release(): card->open_mutex

The patch breaks the chain.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agohsmmc: request_irq says which controller is involved
David Brownell [Sun, 21 Sep 2008 21:16:14 +0000 (14:16 -0700)]
hsmmc: request_irq says which controller is involved

Make the hsmmc driver irq requests say which controller they're
associated with (e.g. "mmc0") so /proc/interrupts is more useful.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoPM: Fixed clockdomain state control for OMAP3
Tero Kristo [Thu, 25 Sep 2008 12:35:49 +0000 (15:35 +0300)]
PM: Fixed clockdomain state control for OMAP3

Hardware supervised control for clockdomain power state transitions now
enabled in omap3_pm_init(). Also fixed set_pwrdm_state() to allow state
changes between sleep states (i.e. RET<->OFF.)

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: GPIO: Enable debounce clock only when debounce is enabled v3.
Jouni Hogander [Thu, 25 Sep 2008 12:35:47 +0000 (15:35 +0300)]
OMAP3: GPIO: Enable debounce clock only when debounce is enabled v3.

This patch changes gpio "driver" to enable debounce clock for
gpio-bank only when debounce is enabled for some gpio in that bank.

Gpio functional clocks are also renamed in clock tree, gpioX_fck ->
gpioX_dbck.

This patch triggers problem with gpio wake-up and Omap3. Gpios in PER
domain aren't capable to generate wake-up if PER domain is in sleep
state. For this iopad wake-up should be used and needed pad
configuration should be done. Enabling iopad wake-up for gpio pads is
left for bootloader or omap mux configuration in kernel.

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Improve 34xx detection
Tony Lindgren [Thu, 25 Sep 2008 12:34:00 +0000 (15:34 +0300)]
ARM: OMAP: Improve 34xx detection

Fix it for ES3.0. Also use ES3.0 now as the default for unknown
future revision, and make the code easier to follow.

Also fixed omap detection for ES2.1 and ES3.0 with a patch from
Tero Kristo.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>