aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-08-01block: initialise bd_super in bdget()Lachlan McIlroy1-0/+1
bd_super is currently reset to NULL in kill_block_super() so we rely on previous users of the block_device object to initialise this value for the next user. This quirk was exposed on RHEL5 when a third party filesystem did not always use kill_block_super() and therefore bd_super wasn't being reset when a block_device object was recycled within the cache. This may not be a problem upstream but makes sense to be defensive. Signed-off-by: Lachlan McIlroy <[email protected]> Reviewed-by: Eric Sandeen <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-08-01vfs: avoid call to inode_lru_list_del() if possibleEric Dumazet1-1/+2
inode_lru_list_del() is expensive because of per superblock lru locking, while some inodes are not in lru list. Adding a check in iput_final() can speedup pipe/sockets workloads on SMP. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-08-01vfs: avoid taking inode_hash_lock on pipes and socketsEric Dumazet2-4/+11
Some inodes (pipes, sockets, ...) are not hashed, no need to take contended inode_hash_lock at dismantle time. nice speedup on SMP machines on socket intensive workloads. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-08-01vfs: conditionally call inode_wb_list_del()Eric Dumazet1-1/+3
Some inodes (pipes, sockets, ...) are not in bdi writeback list. evict() can avoid calling inode_wb_list_del() and its expensive spinlock by checking inode i_wb_list being empty or not. At this point, no other cpu/user can concurrently manipulate this inode i_wb_list Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-08-01VFS: Fix automount for negative autofs dentriesDavid Howells1-9/+15
Autofs may set the DCACHE_NEED_AUTOMOUNT flag on negative dentries. These need attention from the automounter daemon regardless of the LOOKUP_FOLLOW flag. Signed-off-by: David Howells <[email protected]> Acked-by: Ian Kent <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-08-01Btrfs: load the key from the dir item in readdir into a fake dentryJosef Bacik1-2/+45
In btrfs we have 2 indexes for inodes. One is for readdir, it's in this nice sequential order and works out brilliantly for readdir. However if you use ls, it usually stat's each file it gets from readdir. This is where the second index comes in, which is based on a hash of the name of the file. So then the lookup has to lookup this index, and then lookup the inode. The index lookup is going to be in random order (since its based on the name hash), which gives us less than stellar performance. Since we know the inode location from the readdir index, I create a dummy dentry and copy the location key into dentry->d_fsdata. Then on lookup if we have d_fsdata we use that location to lookup the inode, avoiding looking up the other directory index. Thanks, Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-07-31Merge branch 'for-next' of ↵Linus Torvalds44-452/+4118
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (46 commits) mfd: Fix mismatch in twl4030 mutex lock-unlock mfd: twl6030-pwm.c needs MODULE_LICENSE mfd: Fix the omap-usb-host clock API usage on usbhs_disable() mfd: Acknowledge WM8994 IRQs before reporting mfd: Acknowlege all WM831x IRQs before we handle them mfd: Avoid two assignments if failures happen in tps65910_i2c_probe regulator: Storing tps65912 error codes in u8 mfd: Don't leak init_data in tps65910_i2c_probe regulator: aat2870: Add AAT2870 regulator driver backlight: Add AAT2870 backlight driver mfd: Add AAT2870 mfd driver mfd: Remove dead code from max8997-irq mfd: Move TPS55910 Kconfig option mfd: Fix missing stmpe kerneldoc mfd: Fix off-by-one value range checking for tps65912_i2c_write mfd: Add devices for WM831x clocking module mfd: Remove comp{1,2}_threshold sysfs entries in tps65911_comparator_remove mfd: Don't ask about the TPS65912 core driver in Kconfig mfd: Fix off by one in WM831x IRQ code mfd: Add tps65921 support from twl-core ...
2011-07-31Merge branch 'for-linus' of ↵Linus Torvalds12-931/+166
git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/math-emu: Remove unnecessary code m68k/math-emu: Remove commented out old code m68k: Kill warning in setup_arch() when compiling for Sun3 m68k/atari: Prefix GPIO_{IN,OUT} with CODEC_ sparc: iounmap() and *_free_coherent() - Use lookup_resource() m68k/atari: Reserve some ST-RAM early on for device buffer use m68k/amiga: Chip RAM - Use lookup_resource() resources: Add lookup_resource() sparc: _sparc_find_resource() should check for exact matches m68k/amiga: Chip RAM - Offset resource end by CHIP_PHYSADDR m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error m68k/amiga: Chip RAM - Change chipavail to an atomic_t m68k/amiga: Chip RAM - Always allocate from the start of memory m68k/amiga: Chip RAM - Convert from printk() to pr_*() m68k/amiga: Chip RAM - Use tabs for indentation
2011-07-31NFS: Re-enable compilation of nfs with !CONFIG_NFS_V4 || !CONFIG_NFS_V4_1Trond Myklebust2-2/+2
Fix two recently introduced compile problems: Fix a typo in fs/nfs/pnfs.h Move the pnfs_blksize declaration outside the CONFIG_NFS_V4 section in struct nfs_server. Reported-by: Jens Axboe <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-07-31mfd: Fix mismatch in twl4030 mutex lock-unlockSanjeev Premi1-4/+4
A mutex is locked on entry into twl4030_madc_conversion(). Immediate return on some error conditions leaves the mutex locked. This patch ensures that mutex is always unlocked before leaving the function. Signed-off-by: Sanjeev Premi <[email protected]> Cc: Keerthy <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: twl6030-pwm.c needs MODULE_LICENSERandy Dunlap1-0/+2
twl6030_pwm: module license 'unspecified' taints kernel. Signed-off-by: Randy Dunlap <[email protected]> Acked-by: Hemanth V <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Fix the omap-usb-host clock API usage on usbhs_disable()Keshava Munegowda1-2/+2
usbhs_disable function was invoking clk_enable() instead of clk_disable(), thus only increasing the clock usage counter and preventing this particular clock from being ever turned off. Because of this, the power domain of omap4 the USB Host subsystem would never reach lower power states.This patch calls clk_disable() in usbhs_disable function Signed-off-by: Keshava Munegowda <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Acknowledge WM8994 IRQs before reportingMark Brown1-6/+6
This ensures we never have a window where we've handled an interrupt but not told the hardware about it. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Acknowlege all WM831x IRQs before we handle themMark Brown1-17/+13
Ensure that we never have a window where we've handled an interrupt (and therefore need to be notified of new events) but haven't yet told the interrupt controller that this is the case (so any new events will be discarded). Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Avoid two assignments if failures happen in tps65910_i2c_probeJesper Juhl1-3/+3
In drivers/mfd/tps65910.c:tps65910_i2c_probe() there's potential for a tiny optimization. We assign to init_data->irq and init_data->irq_base long before we need them, and there are two potential exits from the function before they are needed. Moving the assignments below these two potential exits means we completely avoid doing them in these two (failure) cases. Signed-off-by: Jesper Juhl <[email protected]> Acked-by: Graeme Gregory <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31regulator: Storing tps65912 error codes in u8Dan Carpenter1-1/+1
get_ctrl_reg() returns -EINVAL so the error handling won't work here if reg is a u8. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Don't leak init_data in tps65910_i2c_probeJesper Juhl1-1/+5
There are a couple of situations where we leak init_data in drivers/mfd/tps65910.c:tps65910_i2c_probe() - this patch should take care of them. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31regulator: aat2870: Add AAT2870 regulator driverJin Park3-0/+240
Add regulator driver for AnalogicTech AAT2870. Signed-off-by: Jin Park <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31backlight: Add AAT2870 backlight driverJin Park3-0/+254
Add backlight driver for AnalogicTech AAT2870. Signed-off-by: Jin Park <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Add AAT2870 mfd driverJin Park4-0/+727
Add mfd core driver for AnalogicTech AAT2870. The AAT2870 is communication through I2C and contains backlight and regulator components. Signed-off-by: Jin Park <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Remove dead code from max8997-irqJesper Juhl1-2/+0
We either hit one of the case's or the default in the switch statement in get_i2c(), so the 'return ERR_PTR(-EINVAL);' at the end of the function is just dead code - remove it. Signed-off-by: Jesper Juhl <[email protected]> Acked-by: MyungJoo Ham <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Move TPS55910 Kconfig optionLinus Walleij2-10/+10
Having another TPS chip at the end of the Kconfig when all it's relatives are grouped together in their own section seems totally counter-intuitive. Move it, also in the Makefile. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Fix missing stmpe kerneldocOm Prakash3-1/+5
Generating kerneldoc for STMPE result in warnings, so fix this by adding missing documentation. Signed-off-by: Om Prakash <[email protected]> Reviewed-by: Rabin Vincent <[email protected]> Reviewed-by: Jonas Aberg <[email protected]> Reviewed-by: Srinidhi Kasagar <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Fix off-by-one value range checking for tps65912_i2c_writeAxel Lin1-1/+1
If bytes == (TPS6591X_MAX_REGISTER + 1), we have a buffer overflow when doing memcpy(&msg[1], src, bytes). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Add devices for WM831x clocking moduleMark Brown1-0/+12
With the new generic clk API that should appear at some point we should be able to support the clocking sensibly in Linux. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Remove comp{1,2}_threshold sysfs entries in tps65911_comparator_removeAxel Lin1-0/+2
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Don't ask about the TPS65912 core driver in KconfigMark Brown1-1/+1
The user has to select the I2C and SPI drivers individually and they select the core driver for the device so there's no point in presenting the user with an option for the core driver. Signed-off-by: Mark Brown <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Fix off by one in WM831x IRQ codeDimitris Papastamos1-0/+5
The GPIO IRQs aren't the first IRQs defined, we need to subtract the base for the GPIOs as well to use them for array indexes. Signed-off-by: Dimitris Papastamos <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Add tps65921 support from twl-coreOleg Drokin1-0/+2
Very similar to TPS65920 List of differences: http://www.ti.com/litv/pdf/swcu066b Signed-off-by: Oleg Drokin <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Add WM831x clock control register definitionsMark Brown1-0/+101
Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Ensure value written by wm831x_set_bits() is within the maskMark Brown1-1/+1
Purely for defensiveness. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Implement tps65910 IRQ cleanupMark Brown2-0/+2
The tps65910_irq_exit() cleanup function was generating a warning from sparse due to the lack of a prototype. This wasn't causing GCC warnings as the driver wasn't cleaning up its IRQs on exit at all so there was no use of an unprototyped function. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Add tunnelcreek watchdog to lpc_sch devicesAlexander Stein1-1/+48
Tunnel Creek has an additional watchdog core. Signed-off-by: Alexander Stein <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Clean-up ab8500 register fileLinus Walleij1-7/+1
This adds a previously undefined test register and removed a number of double-defined accessory detect registers (they are already defined higher up in the file. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Update ab8500 subdevice listLinus Walleij1-49/+166
This synchronize the subdevice entries for the AB8500 MFD driver with the latest development of subdrivers for things like battery charging and temperature monitoring. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: ab8500-core MFD devices marked as initdataRobert Rosengren1-9/+9
Internal MFD device structs are marked as __devinitdata since the kernel will allocate memory for the same when calling mfd_add_devices. Signed-off-by: Robert Rosengren <[email protected]> Reviewed-by: Mattias Wallin <[email protected]> Reviewed-by: Johan Palsson <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31tps65912: add regulator driverMargarita Olaya3-0/+807
The tps65912 consist of 4 DCDCs and 10 LDOs. The output voltages can be configured by the SPI or I2C interface, they are meant to supply power to the main processor and other components. Signed-off-by: Margarita Olaya Cabrera <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31tps65912: gpio: add gpio driverMargarita Olaya4-0/+164
TPS65912 has five GPIOs that can be configured for different purposes. Signed-off-by: Margarita Olaya Cabrera <[email protected]> Acked-by: Grant Likely <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31tps65912: irq: add interrupt controllerMargarita Olaya4-1/+243
This module controls the interrupt handling for the tps65912. The interrupt sources can be the following: - GPIO - PWRON signal - PWRHOLD signal - Temperature detection Signed-off-by: Margarita Olaya Cabrera <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: tps65912: Add new mfd deviceMargarita Olaya6-0/+792
The tps65912 chip is a power management IC. It contains the following components: - Regulators - GPIO controller The core driver is registered as a platform driver, it provides communication through I2C and SPI interfaces. Signed-off-by: Margarita Olaya Cabrera <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Use kstrtoul_from_user in ab8500Peter Huewe1-30/+11
This patch replaces the code for getting an unsigned long from a userspace buffer by a simple call to kstroul_from_user. This makes it easier to read and less error prone. Signed-off-by: Peter Huewe <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Use kstrtoul_from_user in ab3550Peter Huewe1-30/+11
This patch replaces the code for getting an unsigned long from a userspace buffer by a simple call to kstroul_from_user. This makes it easier to read and less error prone. Signed-off-by: Peter Huewe <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Use generic irq chip for jz4740-adcLars-Peter Clausen2-63/+30
Use the generic irq chip framework for implementing the irq chip for the jz4740-adc driver. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Fix error handling if BUG() isn't enabled in WM8994Mark Brown1-2/+2
Even if we would've BUG()ed we should still tidy up after ourselves if that isn't enabled in the kernel config. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Fix WM8994 IRQ register cache restore on resumeMark Brown1-5/+11
When the byte swap was factored out into the per-register I/O functions the register restore for the IRQ mask cache (which we use and store in CPU native format for the interrupt handler) was not updated to do a byte swap when it uses the bulk I/O. Fix this by writing the cache out one register at a time. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Support multiple active WM831x AUXADC conversionsMark Brown2-79/+188
The WM831x AUXADC hardware can schedule multiple conversions at once, allowing higher performance when more than one source is in use as we can have the hardware start new conversions without having to wait for a register write. Take advantage of this in the interrupt driven case, maintaining a list of callers that are waiting for AUXADC conversions and completing them all simultaneously. The external interface of the AUXADC is not changed so there will be limited use of the feature immediately. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Restructure wm8994-core device revision handlingMark Brown1-4/+9
Switch on the device type before revision since anything we do here will be device as well as revision specific. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Allocate wm835x irq descs dynamicallySascha Hauer1-6/+12
This allows boards to leave the irq_base field unitialized and prevents them having to reserve irqs in the platform. pdata can be optional for irq support now. Without pdata the driver allocates some free irq range. With pdata and irq_base > 0 the driver allocates exactly the specified irq. Without pdata the irq defaults to IRQF_TRIGGER_LOW. Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Refactor wm831x AUXADC handling into a separate fileMark Brown3-166/+201
In preparation for some additional work on the wm831x AUXADC code move the support into a separate file. This is a simple code motion patch, there should be no functional changes. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Read wm831x AUXADC conversion results before acknowledging interruptMark Brown2-16/+32
Ensure that there's no possibility of loosing an AUXADC interrupt by reading the conversion result in the IRQ handler when using interrupts. Otherwise it's possible that under very heavy load a new conversion could be initiated before the acknowledgement for a previous interrupt has happened. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>