summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-08-12mfd: Add stmpe auto sleep featureSundar R Iyer3-0/+81
Some STMPE devices support entering sleep mode automatically on a specified timeout of inactivity on the I2C bus with the host system. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Sundar R Iyer <sundar.iyer@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12touchscreen: Fix sign bugKulikov Vasiliy1-1/+1
platform_get_irq_byname() can return negative results, it is not seen to unsigned ts_irq. Make it signed. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Acked-By: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Add support for TWL6030 PWMHemanth V3-0/+173
TWL6030 supports PWM (Pulse Width Modulator) which is used to control charging LED. PWM allows for controlling brightness. This patch implements the APIs required by leds-pwm driver. Signed-off-by: Hemanth V <hemanthv@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Add additional WM8994 GPIO functionsMark Brown1-0/+4
Later revisions of the WM8994 add some more GPIO functions, define them in the header file. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Add JZ4740 ADC driverLars-Peter Clausen4-0/+425
This patch adds a MFD driver for the JZ4740 ADC unit. The driver is used to demultiplex IRQs and synchronize access to shared registers between the battery, hwmon and (future) touchscreen driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12gpiolib: Implement set_debounce for WM831x GPIOsMark Brown1-0/+32
The debounce times are approximate, they can be selected using the two input functions. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12input: STMPE touch controller supportLuotao Fu3-0/+408
This one adds a driver for STMPE touchscreen controllers. This driver depends on the stmpexxx mfd core driver. Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12input: Add STMPE keypad driverRabin Vincent3-0/+397
Add an input driver for the keypad on STMPE I/O expanders. This driver uses the common support provided by the STMPE MFD driver. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12gpio: Add STMPE GPIO driverRabin Vincent3-0/+407
Add support for the GPIOs on STMPE I/O Expanders. [l.fu@pengutronix.de: fix set direction input] [l.fu@pengutronix.de: set GPIO alternate function while requesting] Acked-by: Luotao Fu <l.fu@pengutronix.de> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Add STMPE I/O Expander supportRabin Vincent5-0/+1312
Add support for the STMPE family of I/O Expanders from STMicroelectronics. These devices include upto 24 gpios and a varying selection of blocks, including PWM, keypad, and touchscreen controllers. This patch adds the MFD core. [l.fu@pengutronix.de: fix stmpe811 enable hook] [l.fu@pengutronix.de: add touchscreen platform data] Acked-by: Luotao Fu <l.fu@pengutronix.de> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Properly free t7l66xb clk32k clock sourceAxel Lin1-1/+2
This patch includes below fixes to properly free clk32k clock source: 1. remove a redundant clk_put in t7l66xb_probe error path 2. add missing clk_disable(t7l66xb->clk32k) and clk_put(t7l66xb->clk32k) to properly free the clock source. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: More verbose MFD Kconfig entrySamuel Ortiz1-1/+10
For people to be able to intellingibly decide if they want to enable MFD drivers or not, we have to give them a much better description of what they are.
2010-08-12mfd: Staticise ab3550 register access functionsMark Brown1-11/+12
These are now exported via an ops table rather than referenced directly and so should be staticised. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Fix davinci memory leakJulia Lawall1-2/+4
Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: properly handle platform_device_add_resources fail in mfd_add_deviceAxel Lin1-1/+3
platform_device_add_resources may fail, thus add error checking for it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: kzalloc doesn't return ERR_PTRJulia Lawall1-1/+1
Use !x rather than IS_ERR(x) to test the result of kzalloc. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,E; @@ x = \(kmalloc\|kzalloc\|kcalloc\)(...) ... when != x = E - IS_ERR(x) + !x // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: AB8500 mask off irrelevant bits from the SPI messageLinus Walleij1-1/+6
The registers on the AB8500 are only 8 bits wide, so the content of the remaining bits is undefined. Let's mask off the undefined stuff when returning a register in an SPI read. Acked-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Fix 88pm860x uninitialized variable and clean upDan Carpenter1-40/+32
The original code had a compile warning: drivers/mfd/88pm860x-core.c:431: warning: ‘ret’ may be used uninitialized in this function It seems like the warning is valid if either pdata or pdata->touch is NULL. This patch checks pdata and pdata->touch at the beginning of the function. That means everything can be pulled in one indent level. Now all the statements fit within the 80 character limit. Also at that point the "use_gpadc" variable isn't needed and removing it simplifies the logic. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Haojian Zhuang <hzhuang1@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Fix memory leak in ab3100_otp_probeAxel Lin1-8/+8
In current implementation, there is a memory leak if ab3100_otp_read fail. And in the case of ab3100_otp_init_debugfs fail, it does not properly remove sysfs entries. This patch properly handle above failure cases. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Fix led resource in 88pm860xHaojian Zhuang1-6/+6
Fix typo error in LED resource of 88pm860x. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Enable onkey on max8925Haojian Zhuang1-0/+27
Enable onkey feature in max8925 driver. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-11Merge branch 'for-linus' of ↵Linus Torvalds15-130/+223
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: isofs: Fix lseek() to position beyond 4 GB vfs: remove unused MNT_STRICTATIME vfs: show unreachable paths in getcwd and proc vfs: only add " (deleted)" where necessary vfs: add prepend_path() helper vfs: __d_path: dont prepend the name of the root dentry ia64: perfmon: add d_dname method vfs: add helpers to get root and pwd cachefiles: use path_get instead of lone dget fs/sysv/super.c: add support for non-PDP11 v7 filesystems V7: Adjust sanity checks for some volumes Add v7 alias v9fs: fixup for inode_setattr being removed Manual merge to take Al's version of the fs/sysv/super.c file: it merged cleanly, but Al had removed an unnecessary header include, so his side was better.
2010-08-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linusLinus Torvalds9-21/+181
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus: Squashfs: fix checkpatch.pl warnings Squashfs: fix filename typo Squashfs: update Kconfig and documentation for LZO Squashfs: fix block size use in LZO decompressor Squashfs: Add LZO compression support squashfs: fix filename in header comment Squashfs: Make XATTR config name consistent with other file systems squashfs: fix compiler inline warning
2010-08-11Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osdLinus Torvalds4-52/+31
* 'for-linus' of git://git.open-osd.org/linux-open-osd: exofs: Fix groups code when num_devices is not divisible by group_width exofs: Remove useless optimization exofs: exofs_file_fsync and exofs_file_flush correctness exofs: Remove superfluous dependency on buffer_head and writeback
2010-08-11Merge branch 'for-linus' of ↵Linus Torvalds39-410/+1162
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (39 commits) ceph: generalize mon requests, add pool op support ceph: only queue async writeback on cap revocation if there is dirty data ceph: do not ignore osd_idle_ttl mount option ceph: constify dentry_operations ceph: whitespace cleanup ceph: add flock/fcntl lock support ceph: define on-wire types, constants for file locking support ceph: add CEPH_FEATURE_FLOCK to the supported feature bits ceph: support v2 reconnect encoding ceph: support v2 client_caps encoding ceph: move AES iv definition to shared header ceph: fix decoding of pool snap info ceph: make ->sync_fs not wait if wait==0 ceph: warn on missing snap realm ceph: print useful error message when crush rule not found ceph: use %pU to print uuid (fsid) ceph: sync header defs with server code ceph: clean up header guards ceph: strip misleading/obsolete version, feature info ceph: specify supported features in super.h ...
2010-08-11Merge branch 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msmLinus Torvalds2-4/+1
* 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msm: video: msm: Fix section mismatch in mddi.c. drivers: video: msm: drop some unused variables
2010-08-11Merge branch 'ixp4xx' of ↵Linus Torvalds9-5/+357
git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 * 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6: IXP4xx: Fix LL debugging on little-endian CPU. IXP4xx: Fix sparse warnings in I/O primitives. IXP4xx: Make mdio_bus struct static in the Ethernet driver. IXP4xx: Fix ixp4xx_crypto little-endian operation. IXP4xx: Prevent HSS transmitter lockup by disabling FRaMe signals. ixp4xx/vulcan: add PCI support ixp4xx: base support for Arcom Vulcan
2010-08-11Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds307-4827/+16316
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (226 commits) ARM: 6323/1: cam60: don't use __init for cam60_spi_{flash_platform_data,partitions} ARM: 6324/1: cam60: move cam60_spi_devices to .init.data ARM: 6322/1: imx/pca100: Fix name of spi platform data ARM: 6321/1: fix syntax error in main Kconfig file ARM: 6297/1: move U300 timer to dynamic clock lookup ARM: 6296/1: clock U300 intcon and timer properly ARM: 6295/1: fix U300 apb_pclk split ARM: 6306/1: fix inverted MMC card detect in U300 ARM: 6299/1: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID ARM: 6294/1: etm: do a dummy read from OSSRR during initialization ARM: 6292/1: coresight: add ETM management registers ARM: 6288/1: ftrace: document mcount formats ARM: 6287/1: ftrace: clean up mcount assembly indentation ARM: 6286/1: fix Thumb-2 decompressor broken by "Auto calculate ZRELADDR" ARM: 6281/1: video/imxfb.c: allow usage without BACKLIGHT_CLASS_DEVICE ARM: 6280/1: imx: Fix build failure when including <mach/gpio.h> without <linux/spinlock.h> ARM: S5PV210: Fix on missing s3c-sdhci card detection method for hsmmc3 ARM: S5P: Fix on missing S5P_DEV_FIMC in plat-s5p/Kconfig ARM: S5PV210: Override FIMC driver name on Aquila board ARM: S5PC100: enable FIMC on SMDKC100 ... Fix up conflicts in arch/arm/mach-{s5pc100,s5pv210}/cpu.c due to different subsystem 'setname' calls, and trivial port types in include/linux/serial_core.h
2010-08-11lib/decompress_bunzip2.c: fix checkstack warningPrarit Bhargava1-3/+7
Fix checkstack error: lib/decompress_bunzip2.c: In function `get_next_block': lib/decompress_bunzip2.c:511: warning: the frame size of 1932 bytes is larger than 1024 bytes byteCount, symToByte, and mtfSymbol cannot be declared static or allocated dynamically so place them in the bunzip_data struct. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Cc: Phillip Lougher <phillip@lougher.demon.co.uk> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11kfifo: add example files to the kernel sample directoryStefani Seibold7-1/+614
Add four examples to the kernel sample directory. It shows how to handle: - a byte stream fifo - a integer type fifo - a dynamic record sized fifo - the fifo DMA functions [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Stefani Seibold <stefani@seibold.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11kfifo: replace the old non generic APIStefani Seibold5-2225/+1164
Simply replace the whole kfifo.c and kfifo.h files with the new generic version and fix the kerneldoc API template file. Signed-off-by: Stefani Seibold <stefani@seibold.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11kfifo: add the new generic kfifo APIStefani Seibold2-0/+1446
Add the new version of the kfifo API files kfifo.c and kfifo.h. Signed-off-by: Stefani Seibold <stefani@seibold.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11kfifo: fix kfifo miss use of nozami.cStefani Seibold1-2/+1
There are different types of a fifo which can not handled in C without a lot of overhead. So i decided to write the API as a set of macros, which is the only way to do a kind of template meta programming without C++. This macros handles the different types of fifos in a transparent way. There are a lot of benefits: - Compile time handling of the different fifo types - Better performance (a save put or get of an integer does only generate 9 assembly instructions on a x86) - Type save - Cleaner interface, the additional kfifo_..._rec() functions are gone - Easier to use - Less error prone - Different types of fifos: it is now possible to define a int fifo or any other type. See below for an example. - Smaller footprint for none byte type fifos - No need of creating a second hidden variable, like in the old DEFINE_KFIFO The API was not changed. There are now real in place fifos where the data space is a part of the structure. The fifo needs now 20 byte plus the fifo space. Dynamic assigned or allocated create a little bit more code. Most of the macros code will be optimized away and simple generate a function call. Only the really small one generates inline code. Additionally you can now create fifos for any data type, not only the "unsigned char" byte streamed fifos. There is also a new kfifo_put and kfifo_get function, to handle a single element in a fifo. This macros generates inline code, which is lit bit larger but faster. I know that this kind of macros are very sophisticated and not easy to maintain. But i have all tested and it works as expected. I analyzed the output of the compiler and for the x86 the code is as good as hand written assembler code. For the byte stream fifo the generate code is exact the same as with the current kfifo implementation. For all other types of fifos the code is smaller before, because the interface is easier to use. The main goal was to provide an API which is very intuitive, save and easy to use. So linux will get now a powerful fifo API which provides all what a developer needs. This will save in the future a lot of kernel space, since there is no need to write an own implementation. Most of the device driver developers need a fifo, and also deep kernel development will gain benefit from this API. Here are the results of the text section usage: Example 1: kfifo_put/_get kfifo_in/out current kfifo dynamic allocated 0x000002a8 0x00000291 0x00000299 in place 0x00000291 0x0000026e 0x00000273 kfifo.c new old text section size 0x00000be5 0x000008b2 As you can see, kfifo_put/kfifo_get creates a little bit more code than kfifo_in/kfifo_out, but it is much faster (the code is inline). The code is complete hand crafted and optimized. The text section size is as small as possible. You get all the fifo handling in only 3 kb. This includes type safe fix size records, dynamic records and DMA handling. This should be the final version. All requested features are implemented. Note: Most features of this API doesn't have any users. All functions which are not used in the next 9 months will be removed. So, please adapt your drivers and other sources as soon as possible to the new API and post it. This are the features which are currently not used in the kernel: kfifo_to_user() kfifo_from_user() kfifo_dma_....() macros kfifo_esize() kfifo_recsize() kfifo_put() kfifo_get() The fixed size record elements, exclude "unsigned char" fifo's and the variable size records fifo's This patch: User of the kernel fifo should never bypass the API and directly access the fifo structure. Otherwise it will be very hard to maintain the API. Signed-off-by: Stefani Seibold <stefani@seibold.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11kfifo: kfifo_is_{full,empty} should return bools, not intsRobert P. J. Day1-2/+2
For consistency with other kfifo routines, return bool, not int. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Cc: Stefani Seibold <stefani@seibold.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11fs/sysv/super.c: add support for non-PDP11 v7 filesystemsLubomir Rintel1-24/+51
This adds byte order autodetection (of PDP-11 and LE filesystems). No attempt is made to detect big-endian filesystems -- were there any? Tested with PDP-11 v7 filesystems and PC-IX maintenance floppy. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11fs/sysv: v7: adjust sanity checks for some volumesLubomir Rintel2-2/+15
Newly mkfs-ed filesystems from Seventh Edition have last modification time set to zero, but are otherwise perfectly valid. Also, tighten up other sanity checks to filter out most filesystems with [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11fs/sysv: add v7 aliasLubomir Rintel1-0/+1
So that the module gets autoloaded when a v7 filesystem is mounted. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11kexec: return -EFAULT on copy_to_user() failuresDan Carpenter1-3/+5
copy_to/from_user() returns the number of bytes remaining to be copied. It never returns a negative value. The correct return code is -EFAULT and not -EIO. All the callers check for non-zero returns so that's Ok, but the return code is passed to the user so we should fix this. Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Simon Kagstrom <simon.kagstrom@netinsight.net> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11parport_serial: use the PCI IRQ if offeredFr?d?ric Bri?re1-1/+0
Commit 51dcdfe ("parport: Use the PCI IRQ if offered") added IRQ support for PCI parallel port devices handled by parport_pc, but turned it off for parport_serial, despite a printk() message to the contrary. Signed-off-by: Fr?d?ric Bri?re <fbriere@fbriere.net> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11lib/bug.c: add oops end marker to WARN implementationAnton Blanchard3-1/+3
We are missing the oops end marker for the exception based WARN implementation in lib/bug.c. This is useful for logfile analysis tools. Signed-off-by: Anton Blanchard <anton@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Arjan van de Ven <arjan@infradead.org> Cc: "Kirill A. Shutemov" <kirill@shutemov.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11lib/bug.c: make WARN implementation match the kernel/panic.c oneAnton Blanchard1-4/+7
There are a few issues with the exception based WARN implementation in lib/bug.c: - Inconsistent printk flags. The "cut here" line is printed at KERN_EMERG, so the console and all logged in users see the single line: ------------[ cut here ]------------ for each WARN. Fix this so we print everything at KERN_WARNING to match the kernel/panic.c version. - The lib/bug.c WARN would print "Badness at". Change it to match the kernel/panic.c version which prints "WARNING: at". - Print the list of modules, similar to kernel/panic.c of modules, similar to kernel/panic.c [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Anton Blanchard <anton@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Arjan van de Ven <arjan@infradead.org> Cc: "Kirill A. Shutemov" <kirill@shutemov.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11panic: keep blinking in spite of long spin timer modeTAMUKI Shoichi5-68/+37
To keep panic_timeout accuracy when running under a hypervisor, the current implementation only spins on long time (1 second) calls to mdelay. That brings a good effect, but the problem is the keyboard LEDs don't blink at all on that situation. This patch changes to call to panic_blink_enter() between every mdelay and keeps blinking in spite of long spin timer mode. The time to call to mdelay is now 100ms. Even this change will keep panic_timeout accuracy enough when running under a hypervisor. Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Russell King <linux@arm.linux.org.uk> Acked-by: Dmitry Torokhov <dtor@mail.ru> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11afs: destroy work queue on init failureDan Carpenter1-0/+1
We can clean up the work queue on this error path. This function is called from afs_init(). Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11dma-mapping: add DMA_xxBIT_MASK to feature-removal-schedule.txtFUJITA Tomonori1-0/+8
DMA_xxBIT_MASK macros were marked as deprecated in June 2009. One more year is long enough, I think. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11pci: add PCI DMA unamp state API to feature-removal-schedule.txtFUJITA Tomonori1-0/+9
It was replaced with the DMA unamp state API (which can be used for any bus). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11Documentation: DMA-API-HOWTO.txt: add multiple types of IOMMUs supportFUJITA Tomonori1-0/+10
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11dma-mapping: remove dma_is_consistent APIFUJITA Tomonori22-68/+0
Architectures implement dma_is_consistent() in different ways (some misinterpret the definition of API in DMA-API.txt). So it hasn't been so useful for drivers. We have only one user of the API in tree. Unlikely out-of-tree drivers use the API. Even if we fix dma_is_consistent() in some architectures, it doesn't look useful at all. It was invented long ago for some old systems that can't allocate coherent memory at all. It's better to export only APIs that are definitely necessary for drivers. Let's remove this API. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11scsi: 53c700: remove dma_is_consistent usageFUJITA Tomonori1-3/+0
This driver is the only user of dma_is_consistent(). We plan to remove this API. The driver uses the API in the following way: BUG_ON(!dma_is_consistent(hostdata->dev, pScript) && L1_CACHE_BYTES < dma_get_cache_alignment()); The above code tries to see if L1_CACHE_BYTES is greater than dma_get_cache_alignment() on sysmtes that can not allocate coherent memory (some old systems can't). James Bottomley exmplained that this is necesary because the driver packs the set of mailboxes into a single coherent area and separates the different usages by a L1 cache stride. So it's fatal if the dma He also pointed out that we can kill this checking because we don't hit this BUG_ON on all architectures that actually use the driver. (akpm: stolen from the scsi tree because dma-mapping-remove-dma_is_consistent-api.patch needs it) Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11dma-mapping: parisc: set ARCH_DMA_MINALIGNFUJITA Tomonori1-0/+2
Architectures that handle DMA-non-coherent memory need to set ARCH_DMA_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe: the buffer doesn't share a cache with the others. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: James E.J. Bottomley <jejb@parisc-linux.org> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11dma-mapping: unify dma_get_cache_alignment implementationsFUJITA Tomonori20-114/+8
dma_get_cache_alignment returns the minimum DMA alignment. Architectures defines it as ARCH_DMA_MINALIGN (formally ARCH_KMALLOC_MINALIGN). So we can unify dma_get_cache_alignment implementations. Note that some architectures implement dma_get_cache_alignment wrongly. dma_get_cache_alignment() should return the minimum DMA alignment. So fully-coherent architectures should return 1. This patch also fixes this issue. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>