David Brownell [Mon, 6 Oct 2008 20:17:35 +0000 (13:17 -0700)]
beagle: two more GPIOs
Request two more GPIOs on Beagle: MMC write protect, DVI enable.
Also define the first OMAP3 GPIO mux config symbols, with a new
naming convention. Examples:
- GPIO42 is bidirectional, and uses external pull up/down (if any);
- GPIO42_UP is bidirectional, with an internal pullup;
- GPIO42_DOWN is bidirectional, with an internal pulldown.
- GPIO42_OUT is output-only, and needs no pullup or pulldown.
All of those would be fully functional through the standard GPIO
interface as well as the legacy OMAP-only one, except GPIO42_OUT
which won't let you read the actual pin value after setting it.
There's no special off-mode support for these particular pins;
on Beagle they have external pullups or pulldowns.
(OMAP2 can use this naming convention too, except that since it
has no input-enable the "_OUT" convention can't be used there.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Felipe Balbi [Mon, 22 Sep 2008 15:10:26 +0000 (18:10 +0300)]
omap: ldp: fix compile breakage and physical/virtual address usage
commit bf9454a3aaf2cad2321aa8f97bfd5d8c4ebc7bf5 broke compilation
for ldp board. The following patch fixes it. Also fixes a wrong
cast from a void __iomem * to u32.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
* 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
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
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
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
* 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.
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>
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>
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
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>
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>
[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>
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>
[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.
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>
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>
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*()