aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-12-01Merge branch 'for-linus' of ↵HEADmerge-windowmasterlinux-nextfixesLinus Torvalds9-25/+60
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix meta data raid-repair merge problem Btrfs: skip allocation attempt from empty cluster Btrfs: skip block groups without enough space for a cluster Btrfs: start search for new cluster at the beginning Btrfs: reset cluster's max_size when creating bitmap Btrfs: initialize new bitmaps' list Btrfs: fix oops when calling statfs on readonly device Btrfs: Don't error on resizing FS to same size Btrfs: fix deadlock on metadata reservation when evicting a inode Fix URL of btrfs-progs git repository in docs btrfs scrub: handle -ENOMEM from init_ipath()
2011-12-01Btrfs: fix meta data raid-repair merge problemJan Schmidt1-7/+20
Commit 4a54c8c16 introduced raid-repair, killing the individual readpage_io_failed_hook entries from inode.c and disk-io.c. Commit 4bb31e92 introduced new readahead code, adding a readpage_io_failed_hook to disk-io.c. The raid-repair commit had logic to disable raid-repair, if readpage_io_failed_hook is set. Thus, the readahead commit effectively disabled raid-repair for meta data. This commit changes the logic to always attempt raid-repair when needed and call the readpage_io_failed_hook in case raid-repair fails. This is much more straight forward and should have been like that from the beginning. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Reported-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-30Merge branch 'for-linus' of ↵Linus Torvalds10-45/+62
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB: Fix RCU lockdep splats IB/ipoib: Prevent hung task or softlockup processing multicast response IB/qib: Fix over-scheduling of QSFP work RDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2 RDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logic IB/qib: Don't use schedule_work()
2011-11-30Merge branch 'dt-for-linus' of git://sources.calxeda.com/kernel/linuxLinus Torvalds2-0/+3
* 'dt-for-linus' of git://sources.calxeda.com/kernel/linux: of: Add Silicon Image vendor prefix of/irq: of_irq_init: add check for parent equal to child node
2011-11-30Merge branch 'for-linus' of ↵Linus Torvalds3-4/+46
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: twl: fix twl4030 support for smps regulators regulator: fix use after free bug regulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regulator
2011-11-30Merge branch 'fixes' of ↵Linus Torvalds71-270/+517
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits) ARM: ux500: update defconfig ARM: u300: update defconfig ARM: at91: enable additional boards in existing soc defconfig files ARM: at91: refresh soc defconfig files for 3.2 ARM: at91: rename defconfig files appropriately ARM: OMAP2+: Fix Compilation error when omap_l3_noc built as module ARM: OMAP2+: Remove empty io.h ARM: OMAP2: select ARM_AMBA if OMAP3_EMU is defined ARM: OMAP: smartreflex: fix IRQ handling bug ARM: OMAP: PM: only register TWL with voltage layer when device is present ARM: OMAP: hwmod: Fix the addr space, irq, dma count APIs arm: mx28: fix bit operation in clock setting ARM: imx: export imx_ioremap ARM: imx/mm-imx3: conditionally compile i.MX31 and i.MX35 code ARM: mx5: Fix checkpatch warnings in cpu-imx5.c MAINTAINERS: Add missing directory ARM: imx: drop 'ARCH_MX31' and 'ARCH_MX35' ARM: imx6q: move clock register map to machine_desc.map_io ARM: pxa168/gplugd: add the correct SSP device ARM: Update mach-types to fix mxs build breakage ...
2011-11-30Btrfs: skip allocation attempt from empty clusterAlexandre Oliva1-3/+3
If we don't have a cluster, don't bother trying to allocate from it, jumping right away to the attempt to allocate a new cluster. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-30Btrfs: skip block groups without enough space for a clusterAlexandre Oliva1-1/+1
We test whether a block group has enough free space to hold the requested block, but when we're doing clustered allocation, we can save some cycles by testing whether it has enough room for the cluster upfront, otherwise we end up attempting to set up a cluster and failing. Only in the NO_EMPTY_SIZE loop do we attempt an unclustered allocation, and by then we'll have zeroed the cluster size, so this patch won't stop us from using the block group as a last resort. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-30Btrfs: start search for new cluster at the beginningAlexandre Oliva1-4/+2
Instead of starting at zero (offset is always zero), request a cluster starting at search_start, that denotes the beginning of the current block group. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-30Btrfs: reset cluster's max_size when creating bitmapAlexandre Oliva1-0/+1
The field that indicates the size of the largest contiguous chunk of free space in the cluster is not initialized when setting up bitmaps, it's only increased when we find a larger contiguous chunk. We end up retaining a larger value than appropriate for highly-fragmented clusters, which may cause pointless searches for large contiguous groups, and even cause clusters that do not meet the density requirements to be set up. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-30Btrfs: initialize new bitmaps' listAlexandre Oliva1-0/+1
We're failing to create clusters with bitmaps because setup_cluster_no_bitmap checks that the list is empty before inserting the bitmap entry in the list for setup_cluster_bitmap, but the list field is only initialized when it is restored from the on-disk free space cache, or when it is written out to disk. Besides a potential race condition due to the multiple use of the list field, filesystem performance severely degrades over time: as we use up all non-bitmap free extents, the try-to-set-up-cluster dance is done at every metadata block allocation. For every block group, we fail to set up a cluster, and after failing on them all up to twice, we fall back to the much slower unclustered allocation. To make matters worse, before the unclustered allocation, we try to create new block groups until we reach the 1% threshold, which introduces additional bitmaps and thus block groups that we'll iterate over at each metadata block request.
2011-11-30Btrfs: fix oops when calling statfs on readonly deviceLi Zefan1-3/+3
To reproduce this bug: # dd if=/dev/zero of=img bs=1M count=256 # mkfs.btrfs img # losetup -r /dev/loop1 img # mount /dev/loop1 /mnt OOPS!! It triggered BUG_ON(!nr_devices) in btrfs_calc_avail_data_space(). To fix this, instead of checking write-only devices, we check all open deivces: # df -h /dev/loop1 Filesystem Size Used Avail Use% Mounted on /dev/loop1 250M 28K 238M 1% /mnt Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
2011-11-30Btrfs: Don't error on resizing FS to same sizeMike Fleetwood1-1/+1
It seems overly harsh to fail a resize of a btrfs file system to the same size when a shrink or grow would succeed. User app GParted trips over this error. Allow it by bypassing the shrink or grow operation. Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
2011-11-30Btrfs: fix deadlock on metadata reservation when evicting a inodeMiao Xie3-5/+22
When I ran the xfstests, I found the test tasks was blocked on meta-data reservation. By debugging, I found the reason of this bug: start transaction | v reserve meta-data space | v flush delay allocation -> iput inode -> evict inode ^ | | v wait for delay allocation flush <- reserve meta-data space And besides that, the flush on evicting inode will block the thread, which is reclaiming the memory, and make oom happen easily. Fix this bug by skipping the flush step when evicting inode. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
2011-11-30Fix URL of btrfs-progs git repository in docsArnd Hannemann1-2/+2
The location of the btrfs-progs repository has been changed. This patch updates the documentation accordingly. Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
2011-11-30btrfs scrub: handle -ENOMEM from init_ipath()Dan Carpenter1-0/+5
init_ipath() can return an ERR_PTR(-ENOMEM). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
2011-11-29Merge branches 'cxgb4', 'ipoib', 'misc' and 'qib' into for-nextRoland Dreier9-43/+58
2011-11-29Merge branch 'pm-fixes' of ↵Linus Torvalds4-159/+237
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: Update comments describing device power management callbacks PM / Sleep: Update documentation related to system wakeup PM / Runtime: Make documentation follow the new behavior of irq_safe PM / Sleep: Correct inaccurate information in devices.txt PM / Domains: Document how PM domains are used by the PM core PM / Hibernate: Do not leak memory in error/test code paths
2011-11-29IB: Fix RCU lockdep splatsEric Dumazet6-14/+35
Commit f2c31e32b37 ("net: fix NULL dereferences in check_peer_redir()") forgot to take care of infiniband uses of dst neighbours. Many thanks to Marc Aurele who provided a nice bug report and feedback. Reported-by: Marc Aurele La France <tsi@ualberta.ca> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: David Miller <davem@davemloft.net> Cc: <stable@kernel.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
2011-11-29IB/ipoib: Prevent hung task or softlockup processing multicast responseMike Marciniszyn3-8/+14
This following can occur with ipoib when processing a multicast reponse: BUG: soft lockup - CPU#0 stuck for 67s! [ib_mad1:982] Modules linked in: ... CPU 0: Modules linked in: ... Pid: 982, comm: ib_mad1 Not tainted 2.6.32-131.0.15.el6.x86_64 #1 ProLiant DL160 G5 RIP: 0010:[<ffffffff814ddb27>] [<ffffffff814ddb27>] _spin_unlock_irqrestore+0x17/0x20 RSP: 0018:ffff8802119ed860 EFLAGS: 00000246 0000000000000004 RBX: ffff8802119ed860 RCX: 000000000000a299 RDX: ffff88021086c700 RSI: 0000000000000246 RDI: 0000000000000246 RBP: ffffffff8100bc8e R08: ffff880210ac229c R09: 0000000000000000 R10: ffff88021278aab8 R11: 0000000000000000 R12: ffff8802119ed860 R13: ffffffff8100be6e R14: 0000000000000001 R15: 0000000000000003 FS: 0000000000000000(0000) GS:ffff880028200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 00000000006d4840 CR3: 0000000209aa5000 CR4: 00000000000406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: [<ffffffffa032c247>] ? ipoib_mcast_send+0x157/0x480 [ib_ipoib] [<ffffffff8100bc8e>] ? apic_timer_interrupt+0xe/0x20 [<ffffffff8100bc8e>] ? apic_timer_interrupt+0xe/0x20 [<ffffffffa03283d4>] ? ipoib_path_lookup+0x124/0x2d0 [ib_ipoib] [<ffffffffa03286fc>] ? ipoib_start_xmit+0x17c/0x430 [ib_ipoib] [<ffffffff8141e758>] ? dev_hard_start_xmit+0x2c8/0x3f0 [<ffffffff81439d0a>] ? sch_direct_xmit+0x15a/0x1c0 [<ffffffff81423098>] ? dev_queue_xmit+0x388/0x4d0 [<ffffffffa032d6b7>] ? ipoib_mcast_join_finish+0x2c7/0x510 [ib_ipoib] [<ffffffffa032dab8>] ? ipoib_mcast_sendonly_join_complete+0x1b8/0x1f0 [ib_ipoib] [<ffffffffa02a0946>] ? mcast_work_handler+0x1a6/0x710 [ib_sa] [<ffffffffa015f01e>] ? ib_send_mad+0xfe/0x3c0 [ib_mad] [<ffffffffa00f6c93>] ? ib_get_cached_lmc+0xa3/0xb0 [ib_core] [<ffffffffa02a0f9b>] ? join_handler+0xeb/0x200 [ib_sa] [<ffffffffa029e4fc>] ? ib_sa_mcmember_rec_callback+0x5c/0xa0 [ib_sa] [<ffffffffa029e79c>] ? recv_handler+0x3c/0x70 [ib_sa] [<ffffffffa01603a4>] ? ib_mad_completion_handler+0x844/0x9d0 [ib_mad] [<ffffffffa015fb60>] ? ib_mad_completion_handler+0x0/0x9d0 [ib_mad] [<ffffffff81088830>] ? worker_thread+0x170/0x2a0 [<ffffffff8108e160>] ? autoremove_wake_function+0x0/0x40 [<ffffffff810886c0>] ? worker_thread+0x0/0x2a0 [<ffffffff8108ddf6>] ? kthread+0x96/0xa0 [<ffffffff8100c1ca>] ? child_rip+0xa/0x20 Coinciding with stack trace is the following message: ib0: ib_address_create failed The code below in ipoib_mcast_join_finish() will note the above failure in the address handle but otherwise continue: ah = ipoib_create_ah(dev, priv->pd, &av); if (!ah) { ipoib_warn(priv, "ib_address_create failed\n"); } else { The while loop at the bottom of ipoib_mcast_join_finish() will attempt to send queued multicast packets in mcast->pkt_queue and eventually end up in ipoib_mcast_send(): if (!mcast->ah) { if (skb_queue_len(&mcast->pkt_queue) < IPOIB_MAX_MCAST_QUEUE) skb_queue_tail(&mcast->pkt_queue, skb); else { ++dev->stats.tx_dropped; dev_kfree_skb_any(skb); } My read is that the code will requeue the packet and return to the ipoib_mcast_join_finish() while loop and the stage is set for the "hung" task diagnostic as the while loop never sees a non-NULL ah, and will do nothing to resolve. There are GFP_ATOMIC allocates in the provider routines, so this is possible and should be dealt with. The test that induced the failure is associated with a host SM on the same server during a shutdown. This patch causes ipoib_mcast_join_finish() to exit with an error which will flush the queued mcast packets. Nothing is done to unwind the QP attached state so that subsequent sends from above will retry the join. Reviewed-by: Ram Vepa <ram.vepa@qlogic.com> Reviewed-by: Gary Leshner <gary.leshner@qlogic.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
2011-11-29Merge branch 'slab/urgent' of ↵Linus Torvalds1-16/+26
git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux: slub: avoid potential NULL dereference or corruption slub: use irqsafe_cpu_cmpxchg for put_cpu_partial slub: move discard_slab out of node lock slub: use correct parameter to add a page to partial list tail
2011-11-29Merge branch 'dev' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4Linus Torvalds1-1/+1
* 'dev' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix racy use-after-free in ext4_end_io_dio()
2011-11-29Merge branch 'defconfigs-for-arnd' of ↵Arnd Bergmann453-3335/+3858
git://git.linaro.org/people/triad/linux-stericsson into fixes
2011-11-29of: Add Silicon Image vendor prefixPawel Moll1-0/+1
"sil" is the most commonly used abbreviation for Silicon Image products. Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2011-11-29of/irq: of_irq_init: add check for parent equal to child nodeRob Herring1-0/+2
With the revert of "of/irq: of_irq_find_parent: check for parent equal to child" (dc9372808412edb), we need another way to handle parent node equal to the child node. This can simply be handled in of_irq_init by checking for this condition. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Tested-by: Pawel Moll <pawel.moll@arm.com> Tested-by: Stephen Warren <swarren@nvidia.com>
2011-11-29ARM: ux500: update defconfigLinus Walleij1-9/+5
This updates the Ux500 defconfig with the new drivers for HWSEM and AB5500 core that were merged in the 3.2 cycle. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-11-29ARM: u300: update defconfigLinus Walleij1-7/+6
This updates the U300 defconfig to support some new drivers like FSMC, sets it to use the MMC clock gating scheme, and removes some stale config options. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-11-28Merge branch 'hwmon-for-linus' of ↵Linus Torvalds13-132/+11
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: convert drivers/hwmon/* to use module_platform_driver() hwmon: Remove redundant spi driver bus initialization
2011-11-28Merge branch 'for-linus' of ↵Linus Torvalds1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: efivars: add missing parameter to efi_pstore_read()
2011-11-28efivars: add missing parameter to efi_pstore_read()Christoph Fritz1-1/+2
In the case where CONFIG_PSTORE=n, the function efi_pstore_read() doesn't have the correct list of parameters. This patch provides a definition of efi_pstore_read() with 'char **buf' added to fix this warning: "drivers/firmware/efivars.c:609: warning: initialization from". problem introduced in commit f6f8285132907757ef84ef8dae0a1244b8cde6ac Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2011-11-28Merge branch 'for-3.2-fixes' of ↵Linus Torvalds1-2/+9
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup * 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup_freezer: fix freezing groups with stopped tasks
2011-11-28Merge branch 'for-3.2-fixes' of ↵Linus Torvalds2-31/+48
git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: explain why per_cpu_ptr_to_phys() is more complicated than necessary percpu: fix chunk range calculation percpu: rename pcpu_mem_alloc to pcpu_mem_zalloc
2011-11-28PM: Update comments describing device power management callbacksRafael J. Wysocki1-95/+134
The comments describing device power management callbacks in include/pm.h are outdated and somewhat confusing, so make them reflect the reality more accurately. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-11-28PM / Sleep: Update documentation related to system wakeupRafael J. Wysocki1-22/+38
The system wakeup section of Documentation/power/devices.txt is outdated, so make it agree with the current code. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-11-28PM / Runtime: Make documentation follow the new behavior of irq_safeRafael J. Wysocki1-5/+6
The runtime PM core code behavior related to the power.irq_safe device flag has changed recently and the documentation should be modified to reflect it. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-11-28PM / Sleep: Correct inaccurate information in devices.txtRafael J. Wysocki1-4/+3
The documentation file Documentation/power/devices.txt contains some information that isn't correct any more due to code modifications made after that file had been created (or updated last time). Fix this. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-11-28PM / Domains: Document how PM domains are used by the PM coreRafael J. Wysocki2-26/+45
The current power management documentation in Documentation/power/ either doesn't cover PM domains at all, or gives inaccurate information about them, so update the relevant files in there to follow the code. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-11-28IB/qib: Fix over-scheduling of QSFP workMike Marciniszyn2-20/+8
Don't over-schedule QSFP work on driver initialization. It could end up being run simultaneously on two different CPUs resulting in bad EEPROM reads. In combination with setting the physical IB link state prior to the IBC being brought out of reset, this can cause the link state machine to start training early with wrong settings. Signed-off-by: Mitko Haralanov <mitko@qlogic.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
2011-11-28RDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2Kumar Sanghvi1-1/+3
Fix logic so that we don't retry with MPAv1 once we have done that already. Otherwise, we end up retrying with MPAv1 even when its not needed on getting peer aborts - and this could lead to kernel panic. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
2011-11-28RDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logicJonathan Lallinger1-1/+1
Fix another place in the code where logic dealing with the t4_cqe was using the wrong QID. This fixes the counting logic so that it tests against the SQ QID instead of the RQ QID when counting RCQES. Signed-off by: Jonathan Lallinger <jonathan@ogc.us> Signed-off by: Steve Wise <swise@ogc.us> Signed-off-by: Roland Dreier <roland@purestorage.com>
2011-11-28Merge branch 'for-linus' of ↵Linus Torvalds4-17/+40
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: pstore: pass allocated memory region back to caller
2011-11-28regulator: twl: fix twl4030 support for smps regulatorsTero Kristo1-2/+44
SMPS regulator voltage control differs from the one of the LDO ones. Current TWL code was using LDO regulator ops for controlling the SMPS regulators, which fails. This was fixed fixed by adding separate regulator type which uses correct logic and calculations for the voltage levels. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-11-28Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds15-231/+440
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/exynos: fixed wrong err ptr usage and destroy call in exeception drm/exynos: Add disable of manager drm/exynos: include linux/module.h drm/exynos: fix vblank bug. drm/exynos: changed buffer structure. drm/exynos: removed unnecessary variable. drm/exynos: use gem create function generically drm/exynos: checked for null pointer drm/exynos: added crtc dpms for disable crtc drm/exynos: removed meaningless parameter from fbdev update drm/exynos: restored kernel_fb_list when reiniting fb_helper drm/exynos: changed exynos_drm_display to exynos_drm_display_ops drm/exynos: added manager object to connector drm/exynos: fixed converting between display mode and timing drm/exynos: fixed connector flag with hpd and interlace scan for hdmi drm/exynos: added kms poll for handling hpd event
2011-11-28Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfsLinus Torvalds1-2/+1
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared
2011-11-28Merge branch 'for-linus' of ↵Linus Torvalds26-103/+229
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits) ALSA: hda - Fix jack-detection control of VT1708 ALSA: hda - cut and paste typo in cs420x_models[] ALSA: hda/realtek - Minor cleanup ALSA: hda/realtek - Fix missing inits of item indices for auto-mic ALSA: hda - Fix invalid pin and GPIO for Apple laptops with CS codecs ALSA: hda - Check subdevice mask in snd_hda_check_board_codec_sid_config() ALSA: hda - fail ELD reading early ALSA: lx6464es - fix device communication via command bus ALSA: lx6464es - command buffer API cleanup ALSA: hda - repoll ELD content for multiple times ALSA: hdspm - Fix PCI ID for PCIe RME MADI cards ASoC: Ensure WM8731 register cache is synced when resuming from disabled ALSA: cs5535 - Fix an endianness conversion ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits calls ASoC: wm_hubs: fix DB_RANGE size ASoC: wm9090: fix DB_RANGE size ASoC: wm8993: fix DB_RANGE size ASoC: wm8962: fix DB_RANGE size ASoC: sgtl5000: fix DB_RANGE size ASoC: rt5631: fix DB_RANGE size ...
2011-11-28Merge branch 'timers-urgent-for-linus' of ↵Linus Torvalds4-14/+145
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: hrtimer: Fix extra wakeups from __remove_hrtimer() timekeeping: add arch_offset hook to ktime_get functions clocksource: Avoid selecting mult values that might overflow when adjusted time: Improve documentation of timekeeeping_adjust()
2011-11-28Merge branch 'irq-urgent-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Don't allow per cpu interrupts to be suspended
2011-11-28genirq: fix regression in irqfixup, irqpollEdward Donovan1-1/+3
Commit fa27271bc8d2("genirq: Fixup poll handling") introduced a regression that broke irqfixup/irqpoll for some hardware configurations. Amidst reorganizing 'try_one_irq', that patch removed a test that checked for 'action->handler' returning IRQ_HANDLED, before acting on the interrupt. Restoring this test back returns the functionality lost since 2.6.39. In the current set of tests, after 'action' is set, it must precede '!action->next' to take effect. With this and my previous patch to irq/spurious.c, c75d720fca8a, all IRQ regressions that I have encountered are fixed. Signed-off-by: Edward Donovan <edward.donovan@numble.net> Reported-and-tested-by: Rogério Brito <rbrito@ime.usp.br> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: stable@kernel.org (2.6.39+) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-28regulator: fix use after free bugLothar Waßmann1-1/+1
This is caused by dereferencing 'rdev' after device_unregister() in the regulator_unregister() function. 'rdev' is freed by device_unregister(), so it must not be dereferenced after this call. [Edited commit message for legibility -- broonie] Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28Merge branch 'exynos-drm' of ↵Dave Airlie15-231/+440
git://git.infradead.org/users/kmpark/linux-samsung into drm-fixes * 'exynos-drm' of git://git.infradead.org/users/kmpark/linux-samsung: drm/exynos: fixed wrong err ptr usage and destroy call in exeception drm/exynos: Add disable of manager drm/exynos: include linux/module.h drm/exynos: fix vblank bug. drm/exynos: changed buffer structure. drm/exynos: removed unnecessary variable. drm/exynos: use gem create function generically drm/exynos: checked for null pointer drm/exynos: added crtc dpms for disable crtc drm/exynos: removed meaningless parameter from fbdev update drm/exynos: restored kernel_fb_list when reiniting fb_helper drm/exynos: changed exynos_drm_display to exynos_drm_display_ops drm/exynos: added manager object to connector drm/exynos: fixed converting between display mode and timing drm/exynos: fixed connector flag with hpd and interlace scan for hdmi drm/exynos: added kms poll for handling hpd event
2011-11-28regulator: aat2870: Fix the logic of checking if no id is matched in ↵Axel Lin1-1/+1
aat2870_get_regulator In current implementation, the pointer ri is not NULL if no id is matched. Fix it by checking i == ARRAY_SIZE(aat2870_regulators) if no id is matched. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-11-27Merge branch 'fbdev-for-linus' of git://github.com/schandinat/linux-2.6Linus Torvalds5-10/+23
* 'fbdev-for-linus' of git://github.com/schandinat/linux-2.6: viafb: correct sync polarity for OLPC DCON video:da8xx-fb: Disable and reset sequence on version2 of LCDC OMAPDSS: DISPC: skip scaling calculations when not scaling OMAPFB: fix compilation warnings due to missing include OMAPDSS: HDMI: fix returned HDMI pixel clock
2011-11-27ath9k: Revert change that broke AR928X on Acer Ferrari OneRafael J. Wysocki1-1/+2
Revert a hunk in drivers/net/wireless/ath/ath9k/hw.c introduced by commit 2577c6e8f232 ("ath9k_hw: Add support for AR946/8x chipsets") that caused a nasty regression to appear on my Acer Ferrari One (the box locks up entirely at random times after the wireless has been started without any way to get debug information out of it). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-27Merge branch 'fix/hda' into for-linusTakashi Iwai3-46/+56
2011-11-27ALSA: hda - Fix jack-detection control of VT1708Takashi Iwai1-33/+43
VT1708 has no support for unsolicited events per jack-plug, the driver implements the workq for polling the jack-detection. The mixer element "Jack Detect" was supposed to control this behavior on/off, but this doesn't work properly as is now. The workq is always started and the HP automute is always enabled. This patch fixes the jack-detect control behavior by triggering / stopping the work appropriately at the state change. Also the work checks the internal state to continue scheduling or not. Cc: <stable@kernel.org> [v3.1] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-27ALSA: hda - cut and paste typo in cs420x_models[]Dan Carpenter1-1/+1
The CS420X_IMAC27 was copied from the line before but CS420X_APPLE was clearly intented. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-26iio: iio_event_getfd -- fix ev_int build failureAndy Whitcroft1-10/+9
Fix build failure in staging iio driver: .../drivers/staging/iio/industrialio-core.c: In function 'iio_event_getfd': .../drivers/staging/iio/industrialio-core.c:262:32: error: 'ev_int' undeclared (first use in this function) Also convert the rest of the function to use the new variable. Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-26Merge branch 'merge' of ↵Linus Torvalds9-8/+22
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/44x: Add mtd ndfc to the ppx44x defconfig powerpc: Fix compiliation with hugetlbfs enabled arch/powerpc/sysdev/ehv_pic.c: add missing kfree powerpc/fsl-lbc: Fix for fsl_upm drivers/edac/mpc85xx_edac.c: fix memory controller compatible for edac powerpc/qe: Fixup QE_General4 errata powerpc/85xx: Fix compile error on p3060_qds.c powerpc/p3060qds: Fix select of 'MPC8xxx_GPIO' powerpc/p1023: set IRQ[4:6,11] to active-high level sensitive for PCIe
2011-11-26hwmon: convert drivers/hwmon/* to use module_platform_driver()Axel Lin11-130/+11
This patch converts the drivers in drivers/hwmon/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Donggeun Kim <dg77.kim@samsung.com> Cc: Simon Guinot <sguinot@lacie.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Ben Dooks <ben@simtec.co.uk> Cc: Hans de Goede <hdegoede@redhat.com> Cc: J Keerthy <j-keerthy@ti.com> Cc: David S. Miller <davem@davemloft.net> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-11-25Merge git://github.com/herbertx/cryptoLinus Torvalds1-5/+7
* git://github.com/herbertx/crypto: crypto: mv_cesa - fix hashing of chunks > 1920 bytes
2011-11-25Merge branch 'gpio-fixes' of ↵Linus Torvalds1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson * 'gpio-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: gpio: pca953x: Staticise pca953x_get_altdata()
2011-11-25hwmon: Remove redundant spi driver bus initializationLars-Peter Clausen2-2/+0
In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_register_driver(), so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // <smpl> @@ identifier _driver; @@ struct spi_driver _driver = { .driver = { - .bus = &spi_bus_type, }, }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: lm-sensors@lm-sensors.org Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-11-24ext4: fix racy use-after-free in ext4_end_io_dio()Tejun Heo1-1/+1
ext4_end_io_dio() queues io_end->work and then clears iocb->private; however, io_end->work calls aio_complete() which frees the iocb object. If that slab object gets reallocated, then ext4_end_io_dio() can end up clearing someone else's iocb->private, this use-after-free can cause a leak of a struct ext4_io_end_t structure. Detected and tested with slab poisoning. [ Note: Can also reproduce using 12 fio's against 12 file systems with the following configuration file: [global] direct=1 ioengine=libaio iodepth=1 bs=4k ba=4k size=128m [create] filename=${TESTDIR} rw=write -- tytso ] Google-Bug-Id: 5354697 Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reported-by: Kent Overstreet <koverstreet@google.com> Tested-by: Kent Overstreet <koverstreet@google.com> Cc: stable@kernel.org
2011-11-25powerpc/44x: Add mtd ndfc to the ppx44x defconfigTony Breeds1-0/+2
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Acked-by: Josh Boyer <jwboyer@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-25powerpc: Fix compiliation with hugetlbfs enabledKumar Gala1-0/+1
arch/powerpc/mm/hugetlbpage.c: In function 'reserve_hugetlb_gpages': arch/powerpc/mm/hugetlbpage.c:312:2: error: implicit declaration of function 'parse_args' Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-24cgroup_freezer: fix freezing groups with stopped tasksMichal Hocko1-2/+9
2d3cbf8b (cgroup_freezer: update_freezer_state() does incorrect state transitions) removed is_task_frozen_enough and replaced it with a simple frozen call. This, however, breaks freezing for a group with stopped tasks because those cannot be frozen and so the group remains in CGROUP_FREEZING state (update_if_frozen doesn't count stopped tasks) and never reaches CGROUP_FROZEN. Let's add is_task_frozen_enough back and use it at the original locations (update_if_frozen and try_to_freeze_cgroup). Semantically we consider stopped tasks as frozen enough so we should consider both cases when testing frozen tasks. Testcase: mkdir /dev/freezer mount -t cgroup -o freezer none /dev/freezer mkdir /dev/freezer/foo sleep 1h & pid=$! kill -STOP $pid echo $pid > /dev/freezer/foo/tasks echo FROZEN > /dev/freezer/foo/freezer.state while true do cat /dev/freezer/foo/freezer.state [ "`cat /dev/freezer/foo/freezer.state`" = "FROZEN" ] && break sleep 1 done echo OK Signed-off-by: Michal Hocko <mhocko@suse.cz> Acked-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Tomasz Buchert <tomasz.buchert@inria.fr> Cc: Paul Menage <paul@paulmenage.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: stable@kernel.org Signed-off-by: Tejun Heo <htejun@gmail.com>
2011-11-24Merge branch 'fixes-dss' of ↵Arnd Bergmann12-35/+276
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
2011-11-24Merge branch 'fixes' of ↵Arnd Bergmann16-42/+70
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
2011-11-24Merge branch 'at91/defconfig' into fixesArnd Bergmann6-65/+40
2011-11-24ARM: at91: enable additional boards in existing soc defconfig filesJean-Christophe PLAGNIOL-VILLARD3-0/+24
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2011-11-24ARM: at91: refresh soc defconfig files for 3.2Jean-Christophe PLAGNIOL-VILLARD6-65/+16
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2011-11-24ARM: at91: rename defconfig files appropriatelyJean-Christophe PLAGNIOL-VILLARD4-0/+0
rename all Atmel reference board as soc defconfig Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2011-11-24Merge branch 'mxs/for-arnd' of ↵Arnd Bergmann1-0/+7
git://git.linaro.org/people/shawnguo/linux-2.6 into fixes
2011-11-24arch/powerpc/sysdev/ehv_pic.c: add missing kfreeJulia Lawall1-0/+1
At this point, ehv_pic has been allocated but not stored anywhere, so it should be freed before leaving the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @exists@ local idexpression x; statement S,S1; expression E; identifier fl; expression *ptr != NULL; @@ x = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...kfree(x)...+> } when any when != true x == NULL x->fl ...> ( if (x == NULL) S1 | if (...) { ... when != x when forall ( return \(0\|<+...x...+>\|ptr\); | * return ...; ) } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-24powerpc/fsl-lbc: Fix for fsl_upmAlexandre Rusev1-0/+1
If Freescale LBC driver fails to initialise itself from device tree, then internal structure is freed only but not NULL-fied. As result functions fsl_lbc_find() after checking the structure is not NULL are trying to access device registers. Signed-off-by: Alexandre Rusev <arusev@dev.rtsoft.ru> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-24drivers/edac/mpc85xx_edac.c: fix memory controller compatible for edacShaohui Xie1-1/+1
compatible in dts has been changed, so the driver needs to be updated accordingly. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-24powerpc/qe: Fixup QE_General4 errataJoakim Tjernlund1-1/+1
QE_General4 should only round up the divisor iff divisor is > 3. Rounding up lower divisors makes the error too big, causing USB on MPC832x to fail. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-24slub: avoid potential NULL dereference or corruptionEric Dumazet1-10/+11
show_slab_objects() can trigger NULL dereferences or memory corruption. Another cpu can change its c->page to NULL or c->node to NUMA_NO_NODE while we use them. Use ACCESS_ONCE(c->page) and ACCESS_ONCE(c->node) to make sure this cannot happen. Acked-by: Christoph Lameter <cl@linux.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
2011-11-24slub: use irqsafe_cpu_cmpxchg for put_cpu_partialChristoph Lameter1-1/+1
The cmpxchg must be irq safe. The fallback for this_cpu_cmpxchg only disables preemption which results in per cpu partial page operation potentially failing on non x86 platforms. This patch fixes the following problem reported by Christian Kujau: I seem to hit it with heavy disk & cpu IO is in progress on this PowerBook G4. Full dmesg & .config: http://nerdbynature.de/bits/3.2.0-rc1/oops/ I've enabled some debug options and now it really points to slub.c:2166 http://nerdbynature.de/bits/3.2.0-rc1/oops/oops4m.jpg With debug options enabled I'm currently in the xmon debugger, not sure what to make of it yet, I'll try to get something useful out of it :) Reported-by: Christian Kujau <lists@nerdbynature.de> Tested-by: Christian Kujau <lists@nerdbynature.de> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
2011-11-23powerpc/85xx: Fix compile error on p3060_qds.cKumar Gala1-1/+1
arch/powerpc/platforms/85xx/p3060_qds.c: In function '__machine_initcall_p3060_qds_declare_of_platform_devices': arch/powerpc/platforms/85xx/p3060_qds.c:73:1: error: implicit declaration of function 'declare_of_platform_devices' declare_of_platform_devices should have been corenet_ds_publish_devices. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-23powerpc/p3060qds: Fix select of 'MPC8xxx_GPIO'Paul Bolle1-1/+1
The driver for the Freescale P3060 QDS got added by commit 96cc017c5b ("[...] Add support for P3060QDS board"). Its Kconfig entry selects MPC8xxx_GPIO. But at the time that driver got added MPC8xxx_GPIO was already renamed to GPIO_MPC8XXX, by commit c68308dd50c ("gpio: move mpc8xxx/512x gpio driver to drivers/gpio"). So make this driver select GPIO_MPC8XXX. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-23powerpc/p1023: set IRQ[4:6,11] to active-high level sensitive for PCIeRoy Zang1-4/+13
P1023 external IRQ[4:6, 11] are not pin out, but the interrupts are utilized by the PCIe controllers. As they are not exposed as pins we need to set them as active-high (internal to the SoC these interrupts are pulled down). IRQs[0:3,7:10] are pulled up on the board so we have them set as active-low. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-23Linux 3.2-rc3v3.2-rc3Linus Torvalds1-1/+1
2011-11-23Merge git://github.com/rustyrussell/linuxLinus Torvalds5-3/+23
* git://github.com/rustyrussell/linux: virtio-pci: make reset operation safer virtio-mmio: Correct the name of the guest features selector virtio: add HAS_IOMEM dependency to MMIO platform bus driver
2011-11-24virtio-pci: make reset operation saferMichael S. Tsirkin2-0/+20
virtio pci device reset actually just does an I/O write, which in PCI is really posted, that is it can complete on CPU before the device has received it. Further, interrupts might have been pending on another CPU, so device callback might get invoked after reset. This conflicts with how drivers use reset, which is typically: reset unregister a callback running after reset completed can race with unregister, potentially leading to use after free bugs. Fix by flushing out the write, and flushing pending interrupts. This assumes that device is never reset from its vq/config callbacks, or in parallel with being added/removed, document this assumption. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-11-24virtio-mmio: Correct the name of the guest features selectorSasha Levin2-2/+2
Guest features selector spelling mistake. Cc: Pawel Moll <pawel.moll@arm.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: virtualization@lists.linux-foundation.org Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-11-24virtio: add HAS_IOMEM dependency to MMIO platform bus driverHeiko Carstens1-1/+1
Fix this compile error on s390: CC [M] drivers/virtio/virtio_mmio.o drivers/virtio/virtio_mmio.c: In function 'vm_get_features': drivers/virtio/virtio_mmio.c:107:2: error: implicit declaration of function 'writel' Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-11-23Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-devLinus Torvalds2-1/+5
* 'upstream-linus' of git://github.com/jgarzik/libata-dev: libata: fix build without BMDMA [libata] ahci_platform: fix DT probing
2011-11-23Merge branch 'for-linus' of ↵Linus Torvalds8-25/+51
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: PCI hotplug: shpchp: don't blindly claim non-AMD 0x7450 device IDs PCI: pciehp: wait 100 ms after Link Training check PCI: pciehp: wait 1000 ms before Link Training check PCI: pciehp: Retrieve link speed after link is trained PCI: Let PCI_PRI depend on PCI PCI: Fix compile errors with PCI_ATS and !PCI_IOV PCI / ACPI: Make acpiphp ignore root bridges using PCIe native hotplug
2011-11-23Merge branch 'hwmod_dss_fixes_3.2rc' of git://git.pwsan.com/linux-2.6 into ↵Tony Lindgren12-35/+276
fixes-dss
2011-11-23Merge branch 'fixes-v3.2-rc2' into fixesTony Lindgren666-12203/+21805
2011-11-23ARM: OMAP2+: Fix Compilation error when omap_l3_noc built as moduleGovindraj.R1-1/+1
Fix below compilation failure on mainline kernel 3.2-rc1 when omap_l3_noc.c is built as module. arch/arm/mach-omap2/omap_l3_noc.c:240: error: expected ',' or ';' before 'MODULE_DEVICE_TABLE' Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-11-23ARM: OMAP2+: Remove empty io.hThomas Weber1-0/+0
The file arch/arm/mach-omap2/io.h is empty, so we can remove it. Signed-off-by: Thomas Weber <weber@corscience.de> Acked-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-11-23ARM: OMAP2: select ARM_AMBA if OMAP3_EMU is definedMing Lei1-0/+1
This patch selects ARM_AMBA if OMAP3_EMU is defined because OC_ETM depends on ARM_AMBA, so fix the link failure[1]. [1], arch/arm/kernel/built-in.o: In function `etm_remove': /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:609: undefined reference to `amba_release_regions' arch/arm/kernel/built-in.o: In function `etb_remove': /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:409: undefined reference to `amba_release_regions' arch/arm/kernel/built-in.o: In function `etm_init': /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:640: undefined reference to `amba_driver_register' /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:646: undefined reference to `amba_driver_register' /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:648: undefined reference to `amba_driver_unregister' arch/arm/kernel/built-in.o: In function `etm_probe': /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:545: undefined reference to `amba_request_regions' /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:595: undefined reference to `amba_release_regions' arch/arm/kernel/built-in.o: In function `etb_probe': /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:347: undefined reference to `amba_request_regions' /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:392: undefined reference to `amba_release_regions' arch/arm/mach-omap2/built-in.o: In function `emu_init': /home/tom/git/omap/linux-2.6-omap/arch/arm/mach-omap2/emu.c:62: undefined reference to `amba_device_register' /home/tom/git/omap/linux-2.6-omap/arch/arm/mach-omap2/emu.c:63: undefined reference to `amba_device_register' make: *** [.tmp_vmlinux1] Error 1 making modules Signed-off-by: Ming Lei <tom.leiming@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-11-23ARM: OMAP: smartreflex: fix IRQ handling bugFelipe Balbi1-1/+1
Fix a bug which has been on this driver since it was added by the original commit 984aa6db which would never clear IRQSTATUS bits. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com> Cc: stable@vger.kernel.org Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-11-23ARM: OMAP: PM: only register TWL with voltage layer when device is presentKevin Hilman3-4/+16
Current code registers voltage layer details for TWL PMIC even when a TWL has not been registered. Fix this to only register the TWL with voltage layer when the TWL PMIC is initialized by board-level code. Signed-off-by: Kevin Hilman <khilman@ti.com> Cc: stable@vger.kernel.org Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-11-23ARM: OMAP: hwmod: Fix the addr space, irq, dma count APIssricharan1-3/+3
The address spaces, irqs and dma reqs count APIs return the number of corresponding entries in a hwmod including a additional null value or a -1 terminator in the structure introduced recently. More information here: - 212738a4: omap_hwmod: use a terminator record with omap_hwmod_mpu_irqs arrays - 78183f3f: omap_hwmod: use a null structure record to terminate omap_hwmod_addr_space arrays - bc614958: omap_hwmod: use a terminator record with omap_hwmod_dma_info arrays The issue with irqs and dma info was originally reported by Benoit Cousson. The devices which have multiple hwmods and use device_build_ss are broken with this, as their resources are populated with a extra null value, subsequently the probe fails. So fix the API not to include the array terminator in the count. Reported-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimar@ti.com> Signed-off-by: sricharan <r.sricharan@ti.com> Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: stable@vger.kernel.org Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-11-23Merge branch 'for-linus' of ↵Linus Torvalds4-36/+70
git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs: eCryptfs: Extend array bounds for all filename chars eCryptfs: Flush file in vma close eCryptfs: Prevent file create race condition
2011-11-23eCryptfs: Extend array bounds for all filename charsTyler Hicks1-2/+2
From mhalcrow's original commit message: Characters with ASCII values greater than the size of filename_rev_map[] are valid filename characters. ecryptfs_decode_from_filename() will access kernel memory beyond that array, and ecryptfs_parse_tag_70_packet() will then decrypt those characters. The attacker, using the FNEK of the crafted file, can then re-encrypt the characters to reveal the kernel memory past the end of the filename_rev_map[] array. I expect low security impact since this array is statically allocated in the text area, and the amount of memory past the array that is accessible is limited by the largest possible ASCII filename character. This patch solves the issue reported by mhalcrow but with an implementation suggested by Linus to simply extend the length of filename_rev_map[] to 256. Characters greater than 0x7A are mapped to 0x00, which is how invalid characters less than 0x7A were previously being handled. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Reported-by: Michael Halcrow <mhalcrow@google.com> Cc: stable@kernel.org
2011-11-23eCryptfs: Flush file in vma closeTyler Hicks1-1/+22
Dirty pages weren't being written back when an mmap'ed eCryptfs file was closed before the mapping was unmapped. Since f_ops->flush() is not called by the munmap() path, the lower file was simply being released. This patch flushes the eCryptfs file in the vm_ops->close() path. https://launchpad.net/bugs/870326 Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Cc: stable@kernel.org [2.6.39+]
2011-11-23eCryptfs: Prevent file create race conditionTyler Hicks3-33/+46
The file creation path prematurely called d_instantiate() and unlock_new_inode() before the eCryptfs inode info was fully allocated and initialized and before the eCryptfs metadata was written to the lower file. This could result in race conditions in subsequent file and inode operations leading to unexpected error conditions or a null pointer dereference while attempting to use the unallocated memory. https://launchpad.net/bugs/813146 Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Cc: stable@kernel.org
2011-11-23Merge branch 'fix' of git://github.com/ycmiao/pxa-linux into fixesArnd Bergmann13-15/+15
2011-11-23Merge branch 'imx-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 ↵Arnd Bergmann9-90/+69
into fixes
2011-11-23Merge branch 'samsung-fixes' of ↵Arnd Bergmann7-4/+9
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
2011-11-23Merge branch 'for-arnd' of ↵Arnd Bergmann2-0/+11
git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into fixes
2011-11-23PM / Hibernate: Do not leak memory in error/test code pathsRafael J. Wysocki1-6/+10
The hibernation core code forgets to release memory preallocated for hibernation if there's an error in its early stages or if test modes causing hibernation_snapshot() to return early are used. This causes the system to be hardly usable, because the amount of preallocated memory is usually huge. Fix this problem. Reported-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
2011-11-23Merge branch 'imx6q/fixes' of git://git.linaro.org/people/shawnguo/linux-2.6 ↵Arnd Bergmann3-2/+7
into fixes
2011-11-23arm: mx28: fix bit operation in clock settingWolfram Sang1-1/+1
reg | (1 << clk->enable_shift) always evaluates to true. Switch it to & which makes much more sense. Same fix as 13be9f00 (ARM i.MX28: fix bit operation) at a different location. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: stable@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2011-11-23Merge branch 'for-linus' of ↵Linus Torvalds1-0/+16
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Check parent options for iterated tests
2011-11-23Merge branch 'i2c-for-linus' of ↵Linus Torvalds5-24/+25
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c: Make i2cdev_notifier_call static i2c: Delete ANY_I2C_BUS i2c: Fix device name for 10-bit slave address i2c-algo-bit: Generate correct i2c address sequence for 10-bit target
2011-11-23Merge branch 'for-linus' of ↵Linus Torvalds2-7/+10
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: TPS65910: Fix VDD1/2 voltage selector count
2011-11-23Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds22-432/+600
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (31 commits) drm: integer overflow in drm_mode_dirtyfb_ioctl() drivers/gpu/vga/vgaarb.c: add missing kfree drm/radeon/kms/atom: unify i2c gpio table handling drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real ttm: Don't return the bo reserved on error path drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS drm/i915: Fix inconsistent backlight level during disabled drm, i915: Fix memory leak in i915_gem_busy_ioctl(). drm/i915: Use DPCD value for max DP lanes. drm/i915: Initiate DP link training only on the lanes we'll be using drm/i915: Remove trailing white space drm/i915: Try harder during dp pattern 1 link training drm/i915: Make DP prepare/commit consistent with DP dpms drm/i915: Let panel power sequencing hardware do its job drm/i915: Treat PCH eDP like DP in most places drm/i915: Remove link_status field from intel_dp structure drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control drm/i915: Module parameters using '-1' as default must be signed type drm/i915: Turn on another required clock gating bit on gen6. drm/i915: Turn on a required 3D clock gating bit on Sandybridge. ...
2011-11-23percpu: explain why per_cpu_ptr_to_phys() is more complicated than necessaryDave Young1-0/+11
Add comments about current per_cpu_ptr_to_phys implementation to explain why the logic is more complicated than necessary. -tj: relocated comment into kerneldoc comment Signed-off-by: Dave Young <dyoung@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2011-11-23Merge branch 'fix/asoc' into for-linusTakashi Iwai15-20/+88
2011-11-23regulator: TPS65910: Fix VDD1/2 voltage selector countAfzal Mohammed2-7/+10
Count of selector voltage is required for regulator_set_voltage to work via set_voltage_sel. VDD1/2 currently have it as zero, so regulator_set_voltage won't work for VDD1/2. Update count (n_voltages) for VDD1/2. Output Voltage = (step value * 12.5 mV + 562.5 mV) * gain With above expr, number of voltages that can be selected is step value count * gain count constant for gain count will be called VDD1_2_NUM_VOLT_COARSE existing constant for step value count is VDD1_2_NUM_VOLTS, use VDD1_2_NUM_VOLT_FINE instead to make clear that step value is not the only component in deciding selectable voltage count Signed-off-by: Afzal Mohammed <afzal@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23i2c: Make i2cdev_notifier_call staticShubhrajyoti D1-1/+1
The function i2cdev_notifier_call is used only in i2c-dev file making it static. Also removes the following sparse warning drivers/i2c/i2c-dev.c:582:5: warning: symbol 'i2cdev_notifier_call' was not declared. Should it be static? Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-11-23i2c: Delete ANY_I2C_BUSJean Delvare1-3/+0
Last piece of code using ANY_I2C_BUS was deleted almost 2 years ago, so ANY_I2C_BUS can go away as well. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-11-23i2c: Fix device name for 10-bit slave addressJean Delvare2-18/+22
10-bit addresses overlap with traditional 7-bit addresses, leading in device name collisions. Add an arbitrary offset to 10-bit addresses to prevent this collision. The offset was chosen so that the address is still easily recognizable. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
2011-11-23i2c-algo-bit: Generate correct i2c address sequence for 10-bit targetJeffrey (Sheng-Hui) Chu1-2/+2
The wrong bits were put on the wire, fix that. This fixes kernel bug #42562. Signed-off-by: Sheng-Hui J. Chu <jeffchu@broadcom.com> Cc: stable@kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-11-23drm: integer overflow in drm_mode_dirtyfb_ioctl()Xi Wang2-0/+6
There is a potential integer overflow in drm_mode_dirtyfb_ioctl() if userspace passes in a large num_clips. The call to kmalloc would allocate a small buffer, and the call to fb->funcs->dirty may result in a memory corruption. Reported-by: Haogang Chen <haogangchen@gmail.com> Signed-off-by: Xi Wang <xi.wang@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-23ALSA: hda/realtek - Minor cleanupTakashi Iwai1-12/+12
Use an inline function for the common pattern for assigning a capsrc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-23ALSA: hda/realtek - Fix missing inits of item indices for auto-micTakashi Iwai1-1/+13
When the imux entries are rebuilt in alc_rebuild_imux_for_auto_mic(), the initialization of index field is missing. It may work without it casually when the original imux was created by the auto-parser, but it's definitely broken in the case of static configs where no imux was parsed beforehand. Because of this, the auto-mic switching doesn't work properly on some model options. This patch adds the missing initialization of index field. Reported-by: Dmitry Nezhevenko <dion@inhex.net> Cc: <stable@kernel.org> [v3.1] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-23ALSA: hda - Fix invalid pin and GPIO for Apple laptops with CS codecsTakashi Iwai1-9/+23
The PCI SSID 8086:7270 is commonly used for multiple Apple machines, thus we can't use it as identifier for a unique model. Because of this conflict, some machines show weird behavior. For example, MacBook Air shows Front and Surround speakers although only Surround works due to the wrongly overridden pin-configuration for imac27. This patch fixes two things: - Stop the wrong pin-config override of imac27 by removing PCI SSID entry for avoiding the wrong mappings, - Add the generic GPIO setup for Apple machines by checking the codec SSID vendor bits Tested-by: Linus Torvalds <torvalds@linux-foundation.org> Tested-by: Dirk Hohndel <hohndel@infradead.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-23ALSA: hda - Check subdevice mask in snd_hda_check_board_codec_sid_config()Takashi Iwai1-3/+3
In snd_hda_check_board_codec_sid_config(), not only comparing with the exact value but allow the bit-mask comparison for vendor-only, etc. Tested-by: Linus Torvalds <torvalds@linux-foundation.org> Tested-by: Dirk Hohndel <hohndel@infradead.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-22Revert "of/irq: of_irq_find_parent: check for parent equal to child"Linus Torvalds1-7/+7
This reverts commit dc9372808412edbc653a675a526c2ee6c0c14a91. As requested by Ben Herrenschmidt: "This breaks some powerpc platforms at least. The practice of having a node provide an explicit "interrupt-parent" property pointing to itself is an old trick that we've used in the past to allow a device-node to have interrupts routed to different controllers. In that case, the node also contains an interrupt-map, so the node is its own parent, the interrupt resolution hits the map, which then can route each individual interrupt to a different parent." Grant says: "Ah, nuts, yes that is broken then. Yes, please revert the commit and Rob & I will come up with a better solution. Rob, I think it can be done by explicitly checking for np == desc->interrupt_parent in of_irq_init() instead of relying on of_irq_find_parent() returning NULL." Requested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: devicetree-discuss@lists.ozlabs.org Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org> Cc: Tanmay Inamdar <tinamdar@apm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-22SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is clearedTrond Myklebust1-2/+1
By returning '0' instead of 'EAGAIN' when the tests in xs_nospace() fail to find evidence of socket congestion, we are making the RPC engine believe that the message was incorrectly sent and so it disconnects the socket instead of just retrying. The bug appears to have been introduced by commit 5e3771ce2d6a69e10fcc870cdf226d121d868491 (SUNRPC: Ensure that xs_nospace return values are propagated). Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.kernel.org [>= 2.6.30] Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
2011-11-22Merge branch 'for-linus' of ↵Linus Torvalds3-25/+13
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: mount_subtree() pointless use-after-free iio: fix a leak due to improper use of anon_inode_getfd() microblaze: bury asm/namei.h
2011-11-22drivers/gpu/vga/vgaarb.c: add missing kfreeJulia Lawall1-6/+12
kbuf is a buffer that is local to this function, so all of the error paths leaving the function should release it. Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-22drm/radeon/kms/atom: unify i2c gpio table handlingAlex Deucher1-128/+86
Split the quirks and i2c_rec assignment into separate functions used by both radeon_lookup_i2c_gpio() and radeon_atombios_i2c_init(). This avoids duplicating code and cases where quirks were only added to one of the functions. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-22drm/radeon/kms: fix up gpio i2c mask bits for r4xx for realAlex Deucher1-0/+12
Fixes i2c test failures when i2c_algo_bit.bit_test=1. The hw doesn't actually require a mask, so just set it to the default mask bits for r1xx-r4xx radeon ddc. I missed this part the first time through. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-22ttm: Don't return the bo reserved on error pathThomas Hellstrom1-1/+7
An unlikely race could case a bo to be returned reserved on an error path. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-22Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux ↵Dave Airlie10-211/+354
into drm-fixes * 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux: (25 commits) drm/i915: Fix inconsistent backlight level during disabled drm, i915: Fix memory leak in i915_gem_busy_ioctl(). drm/i915: Use DPCD value for max DP lanes. drm/i915: Initiate DP link training only on the lanes we'll be using drm/i915: Remove trailing white space drm/i915: Try harder during dp pattern 1 link training drm/i915: Make DP prepare/commit consistent with DP dpms drm/i915: Let panel power sequencing hardware do its job drm/i915: Treat PCH eDP like DP in most places drm/i915: Remove link_status field from intel_dp structure drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control drm/i915: Module parameters using '-1' as default must be signed type drm/i915: Turn on another required clock gating bit on gen6. drm/i915: Turn on a required 3D clock gating bit on Sandybridge. drm/i915: enable cacheable objects on Ivybridge drm/i915: add constants to size fence arrays and fields drm/i915: Ivybridge still has fences! drm/i915: forcewake warning fixes in debugfs drm/i915: Fix object refcount leak on mmappable size limit error path. drm/i915: Use mode_config.mutex in ironlake_panel_vdd_work ...
2011-11-22mount_subtree() pointless use-after-freeAl Viro1-2/+4
d'oh... we'd carefully pinned mnt->mnt_sb down, dropped mnt and attempt to grab s_umount on mnt->mnt_sb. The trouble is, *mnt might've been overwritten by now... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-11-22Merge branch 'for-linus' of ↵Linus Torvalds3-8/+33
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ams_delta_serio - include linux/module.h Input: elantech - adjust hw_version detection logic Input: i8042 - add HP Pavilion dv4s to 'notimeout' and 'nomux' blacklists
2011-11-22Merge git://www.linux-watchdog.org/linux-watchdogLinus Torvalds5-366/+3
* git://www.linux-watchdog.org/linux-watchdog: watchdog: fix initialisation printout in s3c2410_wdt watchdog: Don't overwrite error value in wm831x_wdt_set_timeout() watchdog: adx_wdt.c: remove driver
2011-11-22Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfsLinus Torvalds12-62/+89
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: Revert pnfs ugliness from the generic NFS read code path SUNRPC: destroy freshly allocated transport in case of sockaddr init error NFS: Fix a regression in the referral code nfs: move nfs_file_operations declaration to bottom of file.c (try #2) nfs: when attempting to open a directory, fall back on normal lookup (try #5)
2011-11-22Merge branch 'for-linus' of ↵Linus Torvalds13-111/+290
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: remove free-space-cache.c WARN during log replay Btrfs: sectorsize align offsets in fiemap Btrfs: clear pages dirty for io and set them extent mapped Btrfs: wait on caching if we're loading the free space cache Btrfs: prefix resize related printks with btrfs: btrfs: fix stat blocks accounting Btrfs: avoid unnecessary bitmap search for cluster setup Btrfs: fix to search one more bitmap for cluster setup btrfs: mirror_num should be int, not u64 btrfs: Fix up 32/64-bit compatibility for new ioctls Btrfs: fix barrier flushes Btrfs: fix tree corruption after multi-thread snapshots and inode_cache flush
2011-11-22Merge branch 'writeback-for-linus' of ↵Linus Torvalds4-23/+7
git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux * 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux: writeback: remove vm_dirties and task->dirties writeback: hard throttle 1000+ dd on a slow USB stick mm: Make task in balance_dirty_pages() killable
2011-11-22percpu: fix chunk range calculationTejun Heo2-20/+26
Percpu allocator recorded the cpus which map to the first and last units in pcpu_first/last_unit_cpu respectively and used them to determine the address range of a chunk - e.g. it assumed that the first unit has the lowest address in a chunk while the last unit has the highest address. This simply isn't true. Groups in a chunk can have arbitrary positive or negative offsets from the previous one and there is no guarantee that the first unit occupies the lowest offset while the last one the highest. Fix it by actually comparing unit offsets to determine cpus occupying the lowest and highest offsets. Also, rename pcu_first/last_unit_cpu to pcpu_low/high_unit_cpu to avoid confusion. The chunk address range is used to flush cache on vmalloc area map/unmap and decide whether a given address is in the first chunk by per_cpu_ptr_to_phys() and the bug was discovered by invalid per_cpu_ptr_to_phys() translation for crash_note. Kudos to Dave Young for tracking down the problem. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: WANG Cong <xiyou.wangcong@gmail.com> Reported-by: Dave Young <dyoung@redhat.com> Tested-by: Dave Young <dyoung@redhat.com> LKML-Reference: <4EC21F67.10905@redhat.com> Cc: stable @kernel.org
2011-11-22percpu: rename pcpu_mem_alloc to pcpu_mem_zallocBob Liu2-11/+11
Currently pcpu_mem_alloc() is implemented always return zeroed memory. So rename it to make user like pcpu_get_pages_and_bitmap() know don't reinit it. Signed-off-by: Bob Liu <lliubbo@gmail.com> Reviewed-by: Pekka Enberg <penberg@kernel.org> Reviewed-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Tejun Heo <tj@kernel.org>
2011-11-22ALSA: hda - fail ELD reading earlyWu Fengguang1-9/+19
With the ELD repoll mechanism, we can (and should) fail the ELD reading immediately when find something obviously wrong and let the caller retry after some delay. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-22ALSA: lx6464es - fix device communication via command busTim Blechmann1-4/+12
commit 6175ddf06b6172046a329e3abfd9c901a43efd2e optimized the mem*io functions that have been used to send commands to the device. these optimizations somehow corrupted the communication with the lx6464es, that resulted the device to be unusable with kernels after 2.6.33. this patch emulates the memcpy_*_io functions via a loop to avoid these problems. Signed-off-by: Tim Blechmann <tim@klingt.org> LKML-Reference: <4ECB5257.4040600@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-22ALSA: lx6464es - command buffer API cleanupTim Blechmann2-6/+4
the command buffer is only accessed from one file, so we can declare the specific functions as static in that file Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-22ALSA: hda - repoll ELD content for multiple timesWu Fengguang1-6/+10
Improve the one-shot ELD repoll to up to 6 retries. Up to now the 300ms looks sufficient for the test boxes. However I'm a bit worried about how well it can fit the wider user base. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-22Merge branch 'cleanups/remove-unused-kconfig' into imx-fixes-for-arndSascha Hauer1-13/+0
2011-11-22Merge branch 'cleanups/assorted' into imx-fixes-for-arndSascha Hauer7-51/+36
Conflicts: arch/arm/mach-imx/mm-imx3.c Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22Merge branches 'fixes/imx3-build', 'fixes/imx_ioremap' and ↵Sascha Hauer2-0/+3
'fixes/maintainer-update' into imx-fixes
2011-11-22ARM: imx: export imx_ioremapArnd Bergmann1-0/+2
The arch_ioremap function on i.MX is now an indirect function pointer. In order to use it from any loadable module, the pointer itself has to be exported. ERROR: "imx_ioremap" [drivers/video/tmiofb.ko] undefined! ERROR: "imx_ioremap" [drivers/usb/host/sl811-hcd.ko] undefined! ERROR: "imx_ioremap" [drivers/usb/host/r8a66597-hcd.ko] undefined! ERROR: "imx_ioremap" [drivers/usb/host/oxu210hp-hcd.ko] undefined! ERROR: "imx_ioremap" [drivers/usb/gadget/r8a66597-udc.ko] undefined! Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22ARM: imx/mm-imx3: conditionally compile i.MX31 and i.MX35 codeUwe Kleine-König1-27/+31
This fixes building a kernel for only one of the two SOCs. Without this patch an i.MX31 only build fails with: arch/arm/mach-imx/built-in.o: In function `imx35_init_early': mach-bug.c:(.init.text+0x2c): undefined reference to `mxc_iomux_v3_init' arch/arm/mach-imx/built-in.o: In function `imx35_soc_init': mach-bug.c:(.init.text+0xe4): undefined reference to `mx35_revision' Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22ARM: mx5: Fix checkpatch warnings in cpu-imx5.cFabio Estevam1-2/+3
Fix the following warnings reported by checkpatch: WARNING: Use #include <linux/io.h> instead of <asm/io.h> #19: FILE: arm/mach-imx/cpu-imx5.c:19: +#include <asm/io.h> WARNING: line over 80 characters #70: FILE: arm/mach-imx/cpu-imx5.c:70: + if (mx51_revision() < IMX_CHIP_REVISION_3_0 && (elf_hwcap & HWCAP_NEON)) { Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22MAINTAINERS: Add missing directorySascha Hauer1-0/+1
arch/arm/mach-imx/ is part of the i.MX support. Add it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22ARM: imx: drop 'ARCH_MX31' and 'ARCH_MX35'Paul Bolle1-13/+0
Commit 27ad4bf72a ("ARM: imx: move mx3 support to mach-imx") kept ARCH_MX31 and ARCH_MX35 'for compatibility'. Now that they aren't actually used anymore, they can be dropped entirely. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22ALSA: hdspm - Fix PCI ID for PCIe RME MADI cardsAdrian Knoth1-1/+1
Commit c09403dcc5698abf214329fbbf3cf8dbb5558bea has introduced a regression: PCIe versions of RME MADI were no longer detected, because the MADIface ID (0xd5) was used instead of the correct 0xd2. This commit fixes the problem. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-21Merge branch 'staging-linus' of ↵Linus Torvalds3-8/+9
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: fix more ET131X build errors staging: et131x depends on NET staging: slicoss depends on NET linux-next: et131x: Fix build error when CONFIG_PM_SLEEP not enabled
2011-11-21Merge branch 'usb-linus' of ↵Linus Torvalds42-282/+332
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (48 commits) USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c USB: option: add PID of Huawei E173s 3G modem OHCI: final fix for NVIDIA problems (I hope) USB: option: release new PID for ZTE 3G modem usb: Netlogic: Fix HC_LENGTH call in ehci-xls.c USB: storage: ene_ub6250: fix compile warnings USB: option: add id for 3G dongle Model VT1000 of Viettel USB: serial: pl2303: rm duplicate id USB: pch_udc: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor USB: pch_udc: Support new device LAPIS Semiconductor ML7831 IOH usb-storage: Accept 8020i-protocol commands longer than 12 bytes USB: quirks: adding more quirky webcams to avoid squeaky audio powerpc/usb: fix type cast for address of ioremap to compatible with 64-bit USB: at91: at91-ohci: fix set/get power USB: cdc-acm: Fix disconnect() vs close() race USB: add quirk for Logitech C600 web cam USB: EHCI: fix HUB TT scheduling issue with iso transfer USB: XHCI: resume root hubs when the controller resumes USB: workaround for bug in old version of GCC USB: ark3116 initialisation fix ...
2011-11-21Merge branch 'tty-linus' of ↵Linus Torvalds10-53/+72
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty * 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: TTY: ldisc, wait for ldisc infinitely in hangup TTY: ldisc, move wait idle to caller TTY: ldisc, allow waiting for ldisc arbitrarily long Revert "tty/serial: Prevent drop of DCD on suspend for Tegra UARTs" RS485: fix inconsistencies in the meaning of some variables pch_uart: Fix DMA resource leak issue serial,mfd: Fix CMSPAR setup tty/serial: Prevent drop of DCD on suspend for Tegra UARTs pch_uart: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor pch_uart: Support new device LAPIS Semiconductor ML7831 IOH pch_uart: Fix hw-flow control issue tty: hvc_dcc: Fix duplicate character inputs jsm: Change maintainership
2011-11-21Merge branch 'driver-core-linus' of ↵Linus Torvalds3-8/+15
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core * 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: drivers/base/node.c: fix compilation error with older versions of gcc uio: documentation fixups device.h: Fix struct member documentation
2011-11-21Merge branch 'char-misc-linus' of ↵Linus Torvalds5-31/+77
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc * 'char-misc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: misc: ad525x_dpot: Fix AD8400 spi transfer size. pch_phub: Fix MAC address writing issue for LAPIS ML7831 pch_phub: Improve ADE(Address Decode Enable) control pch_phub: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor pch_phub: Support new device LAPIS Semiconductor ML7831 IOH pcie-gadget-spear: Add "platform:" prefix for platform modalias MAINTAINERS: add CHAR and MISC driver maintainers
2011-11-22viafb: correct sync polarity for OLPC DCONDaniel Drake1-2/+2
While the OLPC display appears to be able to handle either positive or negative sync, the Display Controller only recognises positive sync. This brings viafb (for XO-1.5) in line with lxfb (for XO-1) and fixes a recent regression where the XO-1.5 DCON could no longer be frozen. Thanks to Florian Tobias Schandinat for helping identify the fix. Test case: from a vt, echo 1 > /sys/devices/platform/dcon/freeze should cause the current screen contents to freeze, rather than garbage being displayed. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: stable@kernel.org
2011-11-22Merge branch 'for-3.2-rc' of git://gitorious.org/linux-omap-dss2/linux into ↵Florian Tobias Schandinat3-7/+7
fbdev-for-linus
2011-11-22video:da8xx-fb: Disable and reset sequence on version2 of LCDCManjunathappa, Prakash1-1/+14
Patch follows the disable and software reset sequence specified in version2 to LCDC functional specification. Without this flicker is observed on re-enabling the LCDC. Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21iio: fix a leak due to improper use of anon_inode_getfd()Al Viro1-1/+9
it can fail and in that case ->release() will *not* be called... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-11-21microblaze: bury asm/namei.hAl Viro1-22/+0
altroot support has been gone for years, along with arch/*/asm/namei.h; looks like a dummy survivor that sat it out in microblaze tree... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-11-21Merge branch 'dev' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4Linus Torvalds3-4/+5
* 'dev' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix up a undefined error in ext4_free_blocks in debugging code ext4: add blk_finish_plug in error case of writepages. ext4: Remove kernel_lock annotations ext4: ignore journalled data options on remount if fs has no journal
2011-11-21Merge branch 'for-linus' of ↵Linus Torvalds5-8/+19
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: libceph: Allocate larger oid buffer in request msgs ceph: initialize root dentry ceph: fix iput race when queueing inode work
2011-11-21Merge branch 'for-linus' of ↵Linus Torvalds4-37/+65
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: VFS: Log the fact that we've given ELOOP rather than creating a loop minixfs: kill manual hweight(), simplify fs/minix: Verify bitmap block counts before mounting
2011-11-21fix braino in um patchset (mea culpa)Al Viro1-1/+1
wrong register returned... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-21Btrfs: remove free-space-cache.c WARN during log replayChris Mason1-1/+7
The log replay code only partially loads block groups, since the block group caching code is able to detect and deal with extents the logging code has pinned down. While the logging code is pinning down block groups, there is a bogus WARN_ON we're hitting if the code wasn't able to find an extent in the cache. This commit removes the warning because it can happen any time there isn't a valid free space cache for that block group. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-21gpio: pca953x: Staticise pca953x_get_altdata()Mark Brown1-2/+2
It's not used outside of the driver so doesn't need to be exported, and sparse notices this and complains about it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21ext4: fix up a undefined error in ext4_free_blocks in debugging codeYongqiang Yang1-1/+1
sbi is not defined, so let ext4_free_blocks use EXT4_SB(sb) instead when EXT4FS_DEBUG is defined. Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
2011-11-21ASoC: Ensure WM8731 register cache is synced when resuming from disabledMark Brown1-0/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2011-11-21Merge branch 'DB_RANGE-size-fixes' of ↵Mark Brown7-10/+10
git://git.alsa-project.org/alsa-kprivate into for-3.2
2011-11-21ALSA: cs5535 - Fix an endianness conversionDan Carpenter1-1/+1
desc->size is supposed to be a le16 type. On a big endian system the current code will set ->size to zero. We fixed a similar bug on the next line but missed this one. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-21crypto: mv_cesa - fix hashing of chunks > 1920 bytesPhil Sutter1-5/+7
This was broken by commit 7759995c75ae0cbd4c861582908449f6b6208e7a (yes, myself). The basic problem here is since the digest state is only saved after the last chunk, the state array is only valid when handling the first chunk of the next buffer. Broken since linux-3.0. Signed-off-by: Phil Sutter <phil.sutter@viprinet.com> Cc: <stable@kernel.org> # 3.1.x Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2011-11-20VFS: Log the fact that we've given ELOOP rather than creating a loopDavid Howells1-1/+10
To prevent an NFS server from being used to create a directory loop in an NFS superblock on the client, the following patch was committed: commit 1836750115f20b774e55c032a3893e8c5bdf41ed Author: Al Viro <viro@zeniv.linux.org.uk> Date: Tue Jul 12 21:42:24 2011 -0400 Subject: fix loop checks in d_materialise_unique() This causes ELOOP to be reported to anyone trying to access the dentry that would otherwise cause the kernel to complete the loop. However, no indication is given to the caller as to why an operation that ought to work doesn't. The fault is with the kernel, which doesn't want to try and solve the problem as it gets horrendously messy if there's another mountpoint somewhere in the trees being spliced that can't be moved[*]. [*] The real problem is that we don't handle the excision of a subtree that gets moved _out_ of what we can see. This can happen on the server where a directory is merely moved between two other dirs on the same filesystem, but where destination dir is not accessible by the client. So, given the choice to return ELOOP rather than trying to reconfigure the dentry tree, we should give the caller some indication of why they aren't being allowed to make what should be a legitimate request and log a message. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Sachin Prabhu <sprabhu@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-11-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds77-312/+604
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (86 commits) ipv4: fix redirect handling ping: dont increment ICMP_MIB_INERRORS sky2: fix hang in napi_disable sky2: enforce minimum ring size bonding: Don't allow mode change via sysfs with slaves present f_phonet: fix page offset of first received fragment stmmac: fix pm functions avoiding sleep on spinlock stmmac: remove spin_lock in stmmac_ioctl. stmmac: parameters auto-tuning through HW cap reg stmmac: fix advertising 1000Base capabilties for non GMII iface stmmac: use mdelay on timeout of sw reset sky2: version 1.30 sky2: used fixed RSS key sky2: reduce default Tx ring size sky2: rename up/down functions sky2: pci posting issues sky2: fix hang on shutdown (and other irq issues) r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list MAINTAINERS: change email address for shemminger pch_gbe: Move #include of module.h ...
2011-11-20Merge branch 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds14-49/+189
* 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM guest: prevent tracing recursion with kvmclock Revert "KVM: PPC: Add support for explicit HIOR setting" KVM: VMX: Check for automatic switch msr table overflow KVM: VMX: Add support for guest/host-only profiling KVM: VMX: add support for switching of PERF_GLOBAL_CTRL KVM: s390: announce SYNC_MMU KVM: s390: Fix tprot locking KVM: s390: handle SIGP sense running intercepts KVM: s390: Fix RUNNING flag misinterpretation
2011-11-20Merge branch 'fixes' of ↵Linus Torvalds15-32/+88
http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm * 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: ARM: wire up process_vm_writev and process_vm_readv syscalls ARM: 7160/1: setup: avoid overflowing {elf,arch}_name from proc_info_list ARM: 7158/1: add new MFP implement for NUC900 ARM: 7157/1: fix a building WARNING for nuc900 ARM: 7156/1: l2x0: fix compile error on !CONFIG_USE_OF ARM: 7155/1: arch.h: Declare 'pt_regs' locally ARM: 7154/1: mach-bcmring: fix build error in dma.c ARM: 7153/1: mach-bcmring: fix build error in core.c ARM: 7152/1: distclean: Remove generated .dtb files ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors ARM: 7149/1: spi/pl022: Enable clock in probe Revert "ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage"
2011-11-20Merge branch 'pm-fixes' of ↵Linus Torvalds12-61/+89
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / Suspend: Fix bug in suspend statistics update PM / Hibernate: Fix the early termination of test modes PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset PM Sleep: Do not extend wakeup paths to devices with ignore_children set PM / driver core: disable device's runtime PM during shutdown PM / devfreq: correct Kconfig dependency PM / devfreq: fix use after free in devfreq_remove_device PM / shmobile: Avoid restoring the INTCS state during initialization PM / devfreq: Remove compiler error after irq.h update PM / QoS: Properly use the WARN() macro in dev_pm_qos_add_request() PM / Clocks: Only disable enabled clocks in pm_clk_suspend() ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix PM / shmobile: Don't skip debugging output in pd_power_up()
2011-11-20ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits callsAxel Lin1-3/+5
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Alexander Sverdlin <subaparts@yandex.ru> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-20ASoC: wm_hubs: fix DB_RANGE sizeClemens Ladisch1-1/+1
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20ASoC: wm9090: fix DB_RANGE sizeClemens Ladisch1-3/+3
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the arrays. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20ASoC: wm8993: fix DB_RANGE sizeClemens Ladisch1-1/+1
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20ASoC: wm8962: fix DB_RANGE sizeClemens Ladisch1-2/+2
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the arrays. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20ASoC: sgtl5000: fix DB_RANGE sizeClemens Ladisch1-1/+1
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20ASoC: rt5631: fix DB_RANGE sizeClemens Ladisch1-1/+1
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent the last entry from being omitted. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20ASoC: adau1373: fix DB_RANGE sizeClemens Ladisch1-1/+1
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20Btrfs: sectorsize align offsets in fiemapJosef Bacik1-1/+4
We've been hitting BUG()'s in btrfs_cont_expand and btrfs_fallocate and anywhere else that calls btrfs_get_extent while running xfstests 13 in a loop. This is because fiemap is calling btrfs_get_extent with non-sectorsize aligned offsets, which will end up adding mappings that are not sectorsize aligned, which will cause problems in some cases for subsequent calls to btrfs_get_extent for similar areas that are sectorsize aligned. With this patch I ran xfstests 13 in a loop for a couple of hours and didn't hit the problem that I could previously hit in at most 20 minutes. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
2011-11-20Btrfs: clear pages dirty for io and set them extent mappedJosef Bacik1-0/+5
When doing the io_ctl helpers to clean up the free space cache stuff I stopped using our normal prepare_pages stuff, which means I of course forgot to do things like set the pages extent mapped, which will cause us all sorts of wonderful propblems. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
2011-11-20Btrfs: wait on caching if we're loading the free space cacheJosef Bacik2-41/+81
We've been hitting panics when running xfstest 13 in a loop for long periods of time. And actually this problem has always existed so we've been hitting these things randomly for a while. Basically what happens is we get a thread coming into the allocator and reading the space cache off of disk and adding the entries to the free space cache as we go. Then we get another thread that comes in and tries to allocate from that block group. Since block_group->cached != BTRFS_CACHE_NO it goes ahead and tries to do the allocation. We do this because if we're doing the old slow way of caching we don't want to hold people up and wait for everything to finish. The problem with this is we could end up discarding the space cache at some arbitrary point in the future, which means we could very well end up allocating space that is either bad, or when the real caching happens it could end up thinking the space isn't in use when it really is and cause all sorts of other problems. The solution is to add a new flag to indicate we are loading the free space cache from disk, and always try to cache the block group if cache->cached != BTRFS_CACHE_FINISHED. That way if we are loading the space cache anybody else who tries to allocate from the block group will have to wait until it's finished to make sure it completes successfully. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
2011-11-20Btrfs: prefix resize related printks with btrfs:Arnd Hannemann1-3/+3
For the user it is confusing to find something like: [10197.627710] new size for /dev/mapper/vg0-usr_share is 3221225472 in kernel log, because it doesn't point directly to btrfs. This patch prefixes those messages with "btrfs:" like other btrfs related printks. Signed-off-by: Arnd Hannemann <arnd@arndnet.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-20btrfs: fix stat blocks accountingDavid Sterba1-2/+4
Round inode bytes and delalloc bytes up to real blocksize before converting to sector size. Otherwise eg. files smaller than 512 are reported with zero blocks due to incorrect rounding. Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-20Btrfs: avoid unnecessary bitmap search for cluster setupLi Zefan1-38/+4
setup_cluster_no_bitmap() searches all the extents and bitmaps starting from offset. Therefore if it returns -ENOSPC, all the bitmaps starting from offset are in the bitmaps list, so it's sufficient to search from this list in setup_cluser_bitmap(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-20Btrfs: fix to search one more bitmap for cluster setupLi Zefan1-0/+12
Suppose there are two bitmaps [0, 256], [256, 512] and one extent [100, 120] in the free space cache, and we want to setup a cluster with offset=100, bytes=50. In this case, there will be only one bitmap [256, 512] in the temporary bitmaps list, and then setup_cluster_bitmap() won't search bitmap [0, 256]. The cause is, the list is constructed in setup_cluster_no_bitmap(), and only bitmaps with bitmap_entry->offset >= offset will be added into the list, and the very bitmap that convers offset has bitmap_entry->offset <= offset. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-20btrfs: mirror_num should be int, not u64Jan Schmidt3-4/+4
My previous patch introduced some u64 for failed_mirror variables, this one makes it consistent again. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-20btrfs: Fix up 32/64-bit compatibility for new ioctlsJeff Mahoney4-6/+9
This patch casts to unsigned long before casting to a pointer and fixes the following warnings: fs/btrfs/extent_io.c:2289:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] fs/btrfs/ioctl.c:2933:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] fs/btrfs/ioctl.c:2937:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] fs/btrfs/ioctl.c:3020:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] fs/btrfs/scrub.c:275:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] fs/btrfs/backref.c:686:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-20Btrfs: fix barrier flushesChris Mason2-17/+134
When btrfs is writing the super blocks, it send barrier flushes to make sure writeback caching drives get all the metadata on disk in the right order. But, we have two bugs in the way these are sent down. When doing full commits (not via the tree log), we are sending the barrier down before the last super when it should be going down before the first. In multi-device setups, we should be waiting for the barriers to complete on all devices before writing any of the supers. Both of these bugs can cause corruptions on power failures. We fix it with some new code to send down empty barriers to all devices before writing the first super. Alexandre Oliva found the multi-device bug. Arne Jansen did the async barrier loop. Signed-off-by: Chris Mason <chris.mason@oracle.com> Reported-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
2011-11-20KVM guest: prevent tracing recursion with kvmclockAvi Kivity1-2/+3
Prevent tracing of preempt_disable() in get_cpu_var() in kvm_clock_read(). When CONFIG_DEBUG_PREEMPT is enabled, preempt_disable/enable() are traced and this causes the function_graph tracer to go into an infinite recursion. By open coding the preempt_disable() around the get_cpu_var(), we can use the notrace version which prevents preempt_disable/enable() from being traced and prevents the recursion. Based on a similar patch for Xen from Jeremy Fitzhardinge. Tested-by: Gleb Natapov <gleb@redhat.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-11-20drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CSMarek Olšák7-98/+135
This adds a new optional chunk to the CS ioctl that specifies optional flags to the CS parser. Why this is useful is explained below. Note that some regs no longer need the NOP relocation packet if this feature is enabled. Tested on r300g and r600g with this flag disabled and enabled. Assume there are two contexts sharing the same mipmapped tiled texture. One context wants to render into the first mipmap and the other one wants to render into the last mipmap. As you probably know, the hardware has a MACRO_SWITCH feature, which turns off macro tiling for small mipmaps, but that only applies to samplers. (at least on r300-r500, though later hardware likely behaves the same) So we want to just re-set the tiling flags before rendering (writing packets), right? ... No. The contexts run in parallel, so they may set the tiling flags simultaneously and then fire their command streams also simultaneously. The last one setting the flags wins, the other one loses. Another problem is when one context wants to render into the first and the last mipmap in one CS. Impossible. It must flush before changing tiling flags and do the rendering into the smaller mipmaps in another CS. Yet another problem is that writing copy_blit in userspace would be a mess involving re-setting tiling flags to please the kernel, and causing races with other contexts at the same time. The only way out of this is to send tiling flags with each CS, ideally with each relocation. But we already do that through the registers. So let's just use what we have in the registers. Signed-off-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-19Merge branch 'hwmon-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (exynos4_tmu) Fix Kconfig dependency [ Merging code in-flight, just because I can. What timezone should I use? - Linus ]