aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-11-18xen: update maintainer infoxen/next-3.2Jeremy Fitzhardinge1-2/+2
No longer at Citrix, still interested in Xen. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2011-11-15Merge branch 'master' of ↵Jeremy Fitzhardinge306-2897/+2994
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into xen/next-3.2 * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux: (223 commits) hugetlb: release pages in the error path of hugetlb_cow() drivers/firmware/dmi_scan.c: make dmi_name_in_vendors more focused oom: do not kill tasks with oom_score_adj OOM_SCORE_ADJ_MIN drivers/misc/eeprom: fix dependecy on 'PPC_MPC5200_GPIO' MAINTAINERS: add new cgroup list to CC notice Revert "leds: save the delay values after a successful call to blink_set()" KEYS: Fix a NULL pointer deref in the user-defined key type drm/radeon/kms: fix segfault in pm rework drm/radeon/kms: fix up gpio i2c mask bits for r4xx drm/radeon: add some missing FireMV pci ids Linux 3.2-rc2 hfs: add sanity check for file name length fsl-rio: fix compile error MIPS: lantiq: use export.h in favour of module.h MAINTAINERS: The MIPS git tree has moved. vgaarb: a NULL bridge is acceptable for root devices. drm: Remove utterly bogus preempt_disable() sections blackfin: Fixup export.h includes Blackfin: add serial TX IRQ in individual platform resource virtio-pci: fix use after free ...
2011-11-15Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds33-332/+82
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: lantiq: use export.h in favour of module.h MAINTAINERS: The MIPS git tree has moved. MIPS: Fix build error due to missing inclusion of <linux/export.h>. MIPS: ASID conflict after CPU hotplug MIPS: Octeon: Fix compile error in arch/mips/cavium-octeon/flash_setup.c MIPS: errloongson2_clock: Fix build error by including linux/module.h STAGING: octeon-ethernet: Fix compile error caused by skb_frag_struct change MIPS: Hook up process_vm_readv and process_vm_writev system calls. MIPS: Kernel hangs occasionally during boot. MIPS: Octeon: Mark SMP-IPI interrupt as IRQF_NO_THREAD MIPS: BCM47xx: fix build with GENERIC_GPIO configuration MIPS: NXP: Remove unused source files. MIPS: Yosemite, Emma: Fix off-by-two in arcs_cmdline buffer size check
2011-11-15Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds4-47/+40
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon/kms: fix segfault in pm rework drm/radeon/kms: fix up gpio i2c mask bits for r4xx drm/radeon: add some missing FireMV pci ids vgaarb: a NULL bridge is acceptable for root devices. drm: Remove utterly bogus preempt_disable() sections
2011-11-15hugetlb: release pages in the error path of hugetlb_cow()Hillf Danton1-0/+2
If we fail to prepare an anon_vma, the {new, old}_page should be released, or they will leak. Signed-off-by: Hillf Danton <dhillf@gmail.com> Reviewed-by: Andrea Arcangeli <aarcange@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Johannes Weiner <jweiner@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-15drivers/firmware/dmi_scan.c: make dmi_name_in_vendors more focusedJean Delvare1-4/+2
The current implementation of dmi_name_in_vendors() is an invitation to lazy coding and false positives [1]. Searching for a string in 8 know what you're looking for, so you should know where to look. strstr isn't fast, especially when it fails, so we should avoid calling it when it just can't succeed. Looking at the current users of the function, it seems clear to me that they are looking for a system or board vendor name, so let's limit dmi_name_in_vendors to these two DMI fields. This much better matches the function name, BTW. [1] We currently have code looking for short names in DMI data, such as "IBM", "ASUS" or "Acer". I let you guess what will happen the day other vendors ship products named, for example, "SCHREIBMEISTER", "PEGASUS" or "Acerola". Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-15oom: do not kill tasks with oom_score_adj OOM_SCORE_ADJ_MINMichal Hocko1-0/+5
Commit c9f01245 ("oom: remove oom_disable_count") has removed the oom_disable_count counter which has been used for early break out from oom_badness so we could never select a task with oom_score_adj set to OOM_SCORE_ADJ_MIN (oom disabled). Now that the counter is gone we are always going through heuristics calculation and we always return a non zero positive value. This means that we can end up killing a task with OOM disabled because it is indistinguishable from regular tasks with 1% resp. CAP_SYS_ADMIN tasks with 3% usage of memory or tasks with oom_score_adj set but OOM enabled. Let's break out early if the task should have OOM disabled. Signed-off-by: Michal Hocko <mhocko@suse.cz> Acked-by: David Rientjes <rientjes@google.com> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Ying Han <yinghan@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-15drivers/misc/eeprom: fix dependecy on 'PPC_MPC5200_GPIO'Paul Bolle1-1/+1
The driver for the DigsyMTC display configuration EEPROMs device got added by commit 469dded183 ("misc/eeprom: add eeprom access driver for digsy_mtc board"). Its Kconfig symbol depends on PPC_MPC5200_GPIO. But at the time that driver got added PPC_MPC5200_GPIO was already renamed to GPIO_MPC5200, by commit 6eae1ace68 ("gpio: Move mpc5200 gpio driver to drivers/gpio"). So make this driver depend on GPIO_MPC5200. And since GPIO_MPC5200 itself implies that GPIOLIB is set, that dependency can be dropped. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Anatolij Gustschin <agust@denx.de> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-15MAINTAINERS: add new cgroup list to CC noticeKAMEZAWA Hiroyuki1-0/+2
As discussed at Kernel Summit(2011), new cgroups mailing list is opened by James. This list is for discussing general cgroup design and patches including all subsystems and for getting more attentions to cgroups/namespaces related issues by developpers. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-15Revert "leds: save the delay values after a successful call to blink_set()"Johan Hovold1-4/+1
Revert commit 6123b0e274503a0d3588e84fbe07c9aa01bfaf5d. The problem this patch intends to solve has alreadqy been fixed by commit 7a5caabd090b ("drivers/leds/ledtrig-timer.c: fix broken sysfs delay handling"). Signed-off-by: Johan Hovold <jhovold@gmail.com> Cc: Antonio Ospite <ospite@studenti.unina.it> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-15KEYS: Fix a NULL pointer deref in the user-defined key typeDavid Howells1-1/+2
Fix a NULL pointer deref in the user-defined key type whereby updating a negative key into a fully instantiated key will cause an oops to occur when the code attempts to free the non-existent old payload. This results in an oops that looks something like the following: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: [<ffffffff81085fa1>] __call_rcu+0x11/0x13e PGD 3391d067 PUD 3894a067 PMD 0 Oops: 0002 [#1] SMP CPU 1 Pid: 4354, comm: keyctl Not tainted 3.1.0-fsdevel+ #1140 /DG965RY RIP: 0010:[<ffffffff81085fa1>] [<ffffffff81085fa1>] __call_rcu+0x11/0x13e RSP: 0018:ffff88003d591df8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000006e RDX: ffffffff8161d0c0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff88003d591e18 R08: 0000000000000000 R09: ffffffff8152fa6c R10: 0000000000000000 R11: 0000000000000300 R12: ffff88003b8f9538 R13: ffffffff8161d0c0 R14: ffff88003b8f9d50 R15: ffff88003c69f908 FS: 00007f97eb18c720(0000) GS:ffff88003bd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 000000003d47a000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process keyctl (pid: 4354, threadinfo ffff88003d590000, task ffff88003c78a040) Stack: ffff88003e0ffde0 ffff88003b8f9538 0000000000000001 ffff88003b8f9d50 ffff88003d591e28 ffffffff810860f0 ffff88003d591e68 ffffffff8117bfea ffff88003d591e68 ffffffff00000000 ffff88003e0ffde1 ffff88003e0ffde0 Call Trace: [<ffffffff810860f0>] call_rcu_sched+0x10/0x12 [<ffffffff8117bfea>] user_update+0x8d/0xa2 [<ffffffff8117723a>] key_create_or_update+0x236/0x270 [<ffffffff811789b1>] sys_add_key+0x123/0x17e [<ffffffff813b84bb>] system_call_fastpath+0x16/0x1b Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Jeff Layton <jlayton@redhat.com> Acked-by: Neil Horman <nhorman@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Acked-by: James Morris <jmorris@namei.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-15drm/radeon/kms: fix segfault in pm reworkAlex Deucher1-15/+5
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-15drm/radeon/kms: fix up gpio i2c mask bits for r4xxAlex 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. 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-15drm/radeon: add some missing FireMV pci idsAlex Deucher1-0/+2
Noticed by Egbert. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Cc: Egbert Eich <eich@suse.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-15Linux 3.2-rc2Linus Torvalds1-1/+1
2011-11-15Merge branch 'iommu/fixes' of ↵Linus Torvalds2-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu * 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: omap: Fix compile failure
2011-11-15Merge branch 'fixes' of git://git.linaro.org/people/triad/linux-pinctrlLinus Torvalds2-15/+8
* 'fixes' of git://git.linaro.org/people/triad/linux-pinctrl: pinctrl: hide subsystem from the populace pinctrl: fix "warning: 'struct pinctrl_dev' declared inside parameter list"
2011-11-15Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: fsl-rio: fix compile error
2011-11-15Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2-32/+38
* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6: gpio: pca953x: propagate the errno from the chip_init functions gpio: pca953x: remove unneeded check for chip type gpio/omap: check return value from irq_alloc_generic_chip gpio/omap: replace MOD_REG_BIT macro with static inline
2011-11-15Merge branch 'for-linus' of ↵Linus Torvalds28-56/+304
git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin: blackfin: Fixup export.h includes Blackfin: add serial TX IRQ in individual platform resource
2011-11-15hfs: add sanity check for file name lengthDan Carpenter1-0/+2
On a corrupted file system the ->len field could be wrong leading to a buffer overflow. Reported-and-acked-by: Clement LECIGNE <clement.lecigne@netasq.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-14fsl-rio: fix compile errorLiu Gang1-1/+1
The "#include <linux/module.h>" was replaced by "#include <linux/export.h>" in the patch "powerpc: various straight conversions from module.h --> export.h". This will cause the following compile problem: arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception': arch/powerpc/sysdev/fsl_rio.c:296: error: implicit declaration of function 'search_exception_tables'. The file fsl_rio.c needs the declaration of function "search_exception_tables" in the header file "linux/module.h". Signed-off-by: Liu Gang <Gang.Liu@freescale.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-11-14MIPS: lantiq: use export.h in favour of module.hJohn Crispin15-13/+15
The code located at arch/mips/lantiq/ included module.h to be able to use the EXPORT_SYMBOL* macros. These can now be directly included using export.h. Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2937/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-11-14MAINTAINERS: The MIPS git tree has moved.Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-11-14vgaarb: a NULL bridge is acceptable for root devices.Dave Airlie1-23/+21
I assumed all PCI buses had a bridge, but playing with qemu recently, I discovered vgaarb bug where it wasn't detecting both devices shared a bridge at the root level. Don't check for NULL, if two buses have a NULL bridge, assume they share the root bus. Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-14drm: Remove utterly bogus preempt_disable() sectionsThomas Gleixner1-9/+0
commit 27641c3f (drm/vblank: Add support for precise vblank timestamping) adds preempt_disable()/enable() around a spin locked section with the comments: * Disable preemption, so vblank_time_lock is held as short as * possible, even under a kernel with PREEMPT_RT patches. /* Disable preemption while holding vblank_time_lock. Do * it explicitely to guard against PREEMPT_RT kernel. Just that this has never been tested on a RT kernel which would have granted that nonsense with a might_sleep() warning because dev->vblank_time_lock is converted to a "sleeping" spinlock on RT. So this is activly wrong on RT and superflous on mainline. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-14blackfin: Fixup export.h includesLars-Peter Clausen8-7/+8
Commit 8dc7a9c84 ("blackfin: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE") inserted some of the include statements into sections protected by an unrelated #if CONFIG_... statement. This can cause, depending on the configuration used, warnings like this one: arch/blackfin/mach-bf537/boards/stamp.c:2940: warning: data definition has no type or storage class arch/blackfin/mach-bf537/boards/stamp.c:2940: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’ arch/blackfin/mach-bf537/boards/stamp.c:2940: warning: parameter names (without types) in function declaration This patch fixes it by moving the includes out of the #if protected sections. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2011-11-14Blackfin: add serial TX IRQ in individual platform resourceSonic Zhang28-49/+296
The serial TX IRQ is not simply (RX IRQ + 1) on some Blackfin chips, so move the values to the platform resources. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2011-11-14Merge branch 'rmobile-fixes-for-linus' of git://github.com/pmundt/linux-shLinus Torvalds13-523/+400
* 'rmobile-fixes-for-linus' of git://github.com/pmundt/linux-sh: ARM: mach-shmobile: cpuidle single/global and last_state fixes ARM: mach-shmobile: move helper macro PORTCR to sh_pfc.h ARM: mach-shmobile: move helper macro PORT_xx to sh_pfc.h ARM: mach-shmobile: move helper macro PORT_DATA_xx to sh_pfc.h ARM: mach-shmobile: ap4evb: remove white space from end of line ARM: mach-shmobile: clock-sh7372: remove un-necessary index ARM: mach-shmobile: kota2: add comment out separator ARM: mach-shmobile: sh73a0: add MMC data pin pull-up
2011-11-14Merge branch 'sh-fixes-for-linus' of git://github.com/pmundt/linux-shLinus Torvalds14-98/+82
* 'sh-fixes-for-linus' of git://github.com/pmundt/linux-sh: mailmap: Fix up some renesas attributions sh: clkfwk: Kill off remaining debugfs cruft. drivers: sh: Kill off dead pathname for runtime PM stub. drivers: sh: Generalize runtime PM platform stub. sh: Wire up process_vm syscalls. sh: clkfwk: add clk_rate_mult_range_round() serial: sh-sci: Fix up SH-2A SCIF support. sh: Fix cached/uncaced address calculation in 29bit mode
2011-11-14Merge git://github.com/rustyrussell/linuxLinus Torvalds1-5/+6
* git://github.com/rustyrussell/linux: virtio-pci: fix use after free
2011-11-14virtio-pci: fix use after freeMichael S. Tsirkin1-5/+6
Commit 31a3ddda166cda86d2b5111e09ba4bda5239fae6 introduced a use after free in virtio-pci. The main issue is that the release method signals removal of the virtio device, while remove signals removal of the pci device. For example, on driver removal or hot-unplug, virtio_pci_release_dev is called before virtio_pci_remove. We then might get a crash as virtio_pci_remove tries to use the device freed by virtio_pci_release_dev. We allocate/free all resources together with the pci device, so we can leave the release method empty. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: stable@kernel.org
2011-11-13Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds1-8/+19
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon/kms/combios: fix dynamic allocation of PM clock modes
2011-11-12ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression)Rafael J. Wysocki1-29/+0
After commit e978aa7d7d57 ("cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state") setting acpi_idle_suspend to 1 by acpi_processor_suspend() causes the ACPI cpuidle routines to return error codes continuously, which in turn causes cpuidle to lock up (hard). However, acpi_idle_suspend doesn't appear to be useful for any particular purpose (it's racy and doesn't really provide any real protection), so it can be removed, which makes the problem go away. Reported-and-tested-by: Tomas M. <tmezzadra@gmail.com> Reported-and-tested-by: Ferenc Wagner <wferi@niif.hu> Tested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-12drm/radeon/kms/combios: fix dynamic allocation of PM clock modesAlex Deucher1-8/+19
I missed the combios path when I updated the atombios pm code. Reported by amarsh04 on IRC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-12Merge branch 'fixes' of ↵Linus Torvalds32-80/+117
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: arm/imx: fix imx6q mmc error when mounting rootfs arm/imx: fix AUTO_ZRELADDR selection arm/imx: fix the references to ARCH_MX3 ARM: mx51/53: set pwm clock parent to ipg_perclk arm/tegra: enable headphone detection gpio on seaboard arm/dt: Fix ventana SDHCI power-gpios arm/tegra: Don't create duplicate gpio and pinmux devices ARM: at91: Fix USBA gadget registration atmel/spi: fix missing probe at91/yl-9200: Fix section mismatch at91: vmalloc fix missing AT91_VIRT_BASE define ARM: at91: usart: drop static map regs for dbgu ARM: picoxcell: add extra temp register to addruart ARM: msm: fix compilation flags for MSM_SCM arm/mxs: fix mmc device adding for mach-mx28evk ARM: mxc: Remove test_for_ltirq ARM:i.MX: fix build error in clock-mx51-mx53.c ARM:i.MX: fix build error in tzic/avic.c ARM: mxc: fix local timer interrupt handling msm: boards: Fix fallout from removal of machine_desc in fixup
2011-11-11[CPUFREQ] db8500: fix build error due to undeclared i variableAxel Lin1-3/+3
The variable i is removed by commit ded8433 "[CPUFREQ] db8500: remove unneeded for loop iteration over freq_table", but current code to print available frequencies still uses the i variable. Thus add the i variable back to fix below buld error: CC drivers/cpufreq/db8500-cpufreq.o drivers/cpufreq/db8500-cpufreq.c: In function 'db8500_cpufreq_init': drivers/cpufreq/db8500-cpufreq.c:123: error: 'i' undeclared (first use in this function) drivers/cpufreq/db8500-cpufreq.c:123: error: (Each undeclared identifier is reported only once drivers/cpufreq/db8500-cpufreq.c:123: error: for each function it appears in.) make[2]: *** [drivers/cpufreq/db8500-cpufreq.o] Error 1 make[1]: *** [drivers/cpufreq] Error 2 make: *** [drivers] Error 2 This patch also fixes using uninitialized i variable as array index. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dave Jones <davej@redhat.com>
2011-11-12Merge branch 'for-linus' of ↵Linus Torvalds31-943/+393
git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (29 commits) m68k/mac: Remove mac_irq_{en,dis}able() wrappers m68k/irq: Remove obsolete support for user vector interrupt fixups m68k/irq: Remove obsolete m68k irq framework m68k/q40: Convert Q40/Q60 to genirq m68k/sun3: Convert Sun3/3x to genirq m68k/sun3: Use the kstat_irqs_cpu() wrapper m68k/apollo: Convert Apollo to genirq m68k/vme: Convert VME to genirq m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq m68k/mac: Optimize interrupts using chain handlers m68k/mac: Convert Mac to genirq m68k/amiga: Optimize interrupts using chain handlers m68k/amiga: Convert Amiga to genirq m68k/amiga: Refactor amiints.c m68k/atari: Remove code and comments about different irq types m68k/atari: Convert Atari to genirq m68k/irq: Add genirq support m68k/irq: Remove obsolete IRQ_FLG_* users m68k/irq: Rename {,__}m68k_handle_int() m68k/irq: Add m68k_setup_irq_controller() ...
2011-11-12Merge branch 'v4l_for_linus' of ↵Linus Torvalds9-16/+30
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] v4l2-ctrl: Send change events to all fh for auto cluster slave controls [media] v4l2-event: Don't set sev->fh to NULL on unsubscribe [media] v4l2-event: Remove pending events from fh event queue when unsubscribing [media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL [media] MAINTAINERS: add a maintainer for s5p-mfc driver [media] v4l: s5p-mfc: fix reported capabilities [media] media: vb2: reset queued list on REQBUFS(0) call [media] media: vb2: set buffer length correctly for all buffer types [media] media: vb2: add a check for uninitialized buffer [media] mxl111sf: fix build warning [media] mxl111sf: remove pointless if condition in mxl111sf_config_spi [media] mxl111sf: check for errors after mxl111sf_write_reg in mxl111sf_idac_config [media] mxl111sf: fix return value of mxl111sf_idac_config [media] uvcvideo: GET_RES should only be checked for BITMAP type menu controls
2011-11-12Merge branch 'merge' of ↵Linus Torvalds28-65/+346
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/kvm: Fix build failure with HV KVM and CBE powerpc/ps3: Fix lv1_gpu_attribute hcall powerpc/ps3: Fix PS3 repository build warnings powerpc/ps3: irq: Remove IRQF_DISABLED powerpc/irq: Remove IRQF_DISABLED powerpc/numa: NUMA topology support for PowerNV powerpc: Add System RAM to /proc/iomem powerpc: Add KVM as module to defconfigs powerpc/kvm: Fix build with older toolchains powerpc, tqm5200: update tqm5200_defconfig to fit for charon board. powerpc/5200: add support for charon board
2011-11-11Merge branch 'rc-fixes' of ↵Linus Torvalds2-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Fix missing system calls check on mips.
2011-11-11bma023: Add SFI translation for this deviceWilliam Douglas1-0/+1
This needed the sfi IRQ 0xFF fix to go in first. It simply plumbs in the bma023 driver with the firmware naming of it. Signed-off-by: William Douglas <william.douglas@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-11vrtc: change its year offset from 1960 to 1972Feng Tang2-10/+13
Real world year equals the value in vrtc YEAR register plus an offset. We used 1960 as the offset to make leap year consistent, but for a device's first use, its YEAR register is 0 and the system year will be parsed as 1960 which is not a valid UNIX time and will cause many applications to fail mysteriously. So we use 1972 instead to fix this issue. Updated patch which adds a sanity check suggested by Mathias This isn't a change in behaviour for systems, because 1972 is the one we actually use. It's the old version in upstream which is out of sync with all devices. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-11ce4100: fix a build errorZhang Rui1-1/+1
Fix a build error. CE4100 with no serial errors because the alternate function is only a prototype not a null function as intended. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-11Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-devLinus Torvalds8-10/+26
* 'upstream-linus' of git://github.com/jgarzik/libata-dev: pata_of_platform: Don't use NO_IRQ [libata] ahci: Add ASMedia ASM1061 support [libata] Issue SRST to Sil3726 PMP sata_sis.c: trivial spelling fix ahci_platform: use dev_get_platdata() [libata] libata-scsi.c: Add function parameter documentation
2011-11-11Merge branch 'for-linus' of ↵Linus Torvalds12-145/+262
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: rename the option to nospace_cache Btrfs: handle bio_add_page failure gracefully in scrub Btrfs: fix deadlock caused by the race between relocation Btrfs: only map pages if we know we need them when reading the space cache Btrfs: fix orphan backref nodes Btrfs: Abstract similar code for btrfs_block_rsv_add{, _noflush} Btrfs: fix unreleased path in btrfs_orphan_cleanup() Btrfs: fix no reserved space for writing out inode cache Btrfs: fix nocow when deleting the item Btrfs: tweak the delayed inode reservations again Btrfs: rework error handling in btrfs_mount() Btrfs: close devices on all error paths in open_ctree() Btrfs: avoid null dereference and leaks when bailing from open_ctree() Btrfs: fix subvol_name leak on error in btrfs_mount() Btrfs: fix memory leak in btrfs_parse_early_options() Btrfs: fix our reservations for updating an inode when completing io Btrfs: fix oops on NULL trans handle in btrfs_truncate btrfs: fix double-free 'tree_root' in 'btrfs_mount()'
2011-11-11Merge branch 'for-linus' of ↵Linus Torvalds14-119/+241
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: ALSA: usb-audio: Use kmemdup rather than duplicating its implementation ALSA: hda - Re-enable the check NO_PRESENCE misc bit ALSA: vmaster - Free slave-links when freeing the master element ALSA: hda - Don't add elements of other codecs to vmaster slave ALSA: intel8x0: improve virtual environment detection ALSA: intel8x0: move virtual environment detection code into one place ALSA: snd_usb_audio: add Logitech HD Webcam c510 to quirk-384 ALSA: hda - fix internal mic on Dell Vostro 3500 laptop ALSA: HDA: Remove quirk for Toshiba T110 ALSA: usb-audio - Fix the missing volume quirks at delayed init ALSA: hda - Mute unused capture sources for Realtek codecs ALSA: intel8x0: Improve comments for VM optimization ASoC: Ensure we get an impedence reported for WM8958 jack detect ASoC: Don't use wm8994->control_data when requesting IRQs ASoC: Don't use wm8994->control_data in wm8994_readable_register() ASoC: Update git repository URL
2011-11-11Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds42-234/+441
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (42 commits) drm/radeon/kms/pm: switch to dynamically allocating clock mode array drm/radeon/kms: optimize r600_pm_profile_init drm/radeon/kms/pm: add a proper pm profile init function for fusion drm/radeon/kms: remove extraneous calls to radeon_pm_compute_clocks() drm/exynos: added padding to be 64-bit align. drm: fix kconfig unmet dependency warning drm: add some comments to drm_wait_vblank and drm_queue_vblank_event drm/radeon/benchmark: signedness bug in radeon_benchmark_move() drm: do not sleep on vblank while holding a mutex MAINTAINERS: exynos: Add EXYNOS DRM maintainer entry drm: try to restore previous CRTC config if mode set fails drm/radeon/kms: make an aux failure debug only drm: drop select of SLOW_WORK drm: serialize access to list of debugfs files drm/radeon/kms: fix use of vram scratch page on evergreen/ni drm/radeon: Make sure CS mutex is held across GPU reset. drm: Ensure string is null terminated. vmwgfx: Only allow 64x64 cursors vmwgfx: Initialize clip rect loop correctly in surface dirty vmwgfx: Close screen object system ...
2011-11-11Merge git://github.com/herbertx/cryptoLinus Torvalds8-3/+63
* git://github.com/herbertx/crypto: crypto: algapi - Fix build problem with NET disabled crypto: user - Fix rwsem leak in crypto_user
2011-11-11Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfsLinus Torvalds9-17/+23
* 'for-linus' of git://oss.sgi.com/xfs/xfs: xfs: fix force shutdown handling in xfs_end_io xfs: constify xfs_item_ops xfs: Fix possible memory corruption in xfs_readlink
2011-11-11Merge branch 'picoxcell-fixes' of git://github.com/jamieiles/linux-2.6-ji ↵Olof Johansson1-1/+1
into fixes
2011-11-11Merge branch 'imx-fixes-for-arnd' of ↵Olof Johansson5-20/+47
git://git.pengutronix.de/git/imx/linux-2.6 into fixes
2011-11-11arm/imx: fix imx6q mmc error when mounting rootfsShawn Guo2-1/+24
The following error is seen in some case when mounting rootfs from SD/MMC cards. Waiting for root device /dev/mmcblk0p1... mmc1: host does not support reading read-only switch. assuming write-enable. mmc1: new high speed SDHC card at address b368 mmcblk0: mmc1:b368 SDC 3.74 GiB mmcblk0: p1 mmc1: Timeout waiting for hardware interrupt. mmcblk0: error -110 transferring data, sector 3678224, nr 40, cmd response 0x900, card status 0xc00 end_request: I/O error, dev mmcblk0, sector 3678225 Buffer I/O error on device mmcblk0p1, logical block 458754 lost page write due to I/O error on mmcblk0p1 This patch fixes the problem by lowering the usdhc clock and correcting watermark configuration. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Chris Ball <cjb@laptop.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11arm/imx: fix AUTO_ZRELADDR selectionShawn Guo1-2/+2
The AUTO_ZRELADDR selection for ARCH_IMX_V4_V5 and ARCH_MX5 should really be mutually exclusive to ZBOOT_ROM just like what ARCH_IMX_V6_V7 does. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11arm/imx: fix the references to ARCH_MX3Shawn Guo1-15/+19
The config symbol ARCH_MX3 has been removed by commit 'a89cf59 arm/imx: merge i.MX3 and i.MX6', and it should not be referenced any more. The patch also change ARCH_MX* to SOC_IMX* for other platforms. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11ARM: mx51/53: set pwm clock parent to ipg_perclkRichard Zhao1-2/+2
Signed-off-by: Richard Zhao <richard.zhao@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11btrfs: rename the option to nospace_cacheDavid Sterba1-2/+2
Rename no_space_cache option to nospace_cache to be more consistent with the rest, where the simple prefix 'no' is used to negate an option. The option has been introduced during the -rc1 cycle and there are has not been widely used, so it's safe. Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-11MIPS: Fix build error due to missing inclusion of <linux/export.h>.Ralf Baechle1-0/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-11-11drm/radeon/kms/pm: switch to dynamically allocating clock mode arrayAlex Deucher2-39/+82
On newer chips the number of clock modes per power state varies. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm/radeon/kms: optimize r600_pm_profile_initAlex Deucher1-68/+32
Avoid a lot of extra loops through the pm state array. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm/radeon/kms/pm: add a proper pm profile init function for fusionAlex Deucher6-39/+94
The new power tables need to be handled differently when setting up the profiles. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm/radeon/kms: remove extraneous calls to radeon_pm_compute_clocks()Alex Deucher2-12/+0
It's already called via the DPMS functions. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11Btrfs: handle bio_add_page failure gracefully in scrubArne Jansen1-35/+29
Currently scrub fails with ENOMEM when bio_add_page fails. Unfortunately dm based targets accept only one page per bio, thus making scrub always fails. This patch just submits the current bio when an error is encountered and starts a new one. Signed-off-by: Arne Jansen <sensille@gmx.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-11drm/exynos: added padding to be 64-bit align.Inki Dae1-0/+2
Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm: fix kconfig unmet dependency warningRandy Dunlap1-0/+1
Fix kconfig unmet dependency warning. BACKLIGHT_CLASS_DEVICE depends on BACKLIGHT_LCD_SUPPORT, so select the latter along with the former. warning: (DRM_RADEON_KMS && DRM_I915 && STUB_POULSBO && FB_BACKLIGHT && PANEL_SHARP_LS037V7DW01 && PANEL_ACX565AKM && USB_APPLEDISPLAY && FB_OLPC_DCON && ASUS_LAPTOP && SONY_LAPTOP && THINKPAD_ACPI && EEEPC_LAPTOP && ACPI_ASUS && ACPI_CMPC && SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT) Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11Merge branch 'drm-nouveau-fixes' of ↵Dave Airlie17-65/+123
git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes * 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau: Fix bandwidth calculation for DisplayPort drm/nouveau: by default use low bpp framebuffer on low memory cards drm/nv10: Change the BO size threshold determining the memory placement range. drm/nvc0: enable acceleration for nvc1 by default drm/nvc0/gr: fixup the mmio list register writes for 0xc1 drm/nvc1: hacky workaround to fix accel issues drm/nvc0/gr: fix some bugs in grctx generation drm/nvc0: enable acceleration on 0xc8 by default drm/nvc0/vram: skip disabled PBFB subunits drm/nv40/pm: fix issues on igp chipsets, which don't have memory drm/nouveau: testing the wrong variable drm/nvc0/vram: storage type 0xc3 is not compressed drm/nv50: fix stability issue on NV86. drm/nouveau: initialize chan->fence.lock before use drm/nv50/vram: fix incorrect detection of bank count on newer chipsets drm/nv50/gr: typo fix, how about we not reset fifo during graph init? drm/nv50/bios: fixup mpll programming from the init table parser drm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify() drm: make sure drm_vblank_init() has been called before touching vbl_lock
2011-11-11drm: add some comments to drm_wait_vblank and drm_queue_vblank_eventIlija Hadzic1-1/+6
during the review of the fix for locks problems in drm_wait_vblank, a couple of false concerns were raised about how the drm_vblank_get and drm_vblank_put are used in this function; it turned out that the code is correct and that it cannot be simplified add a few comments to explain non-obvious flows in the code, to prevent "false alarms" in the future v2: incorporate comments received from Daniel Vetter Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm/radeon/benchmark: signedness bug in radeon_benchmark_move()Dan Carpenter1-1/+1
radeon_benchmark_do_move() returns an int so "time" should be int too. Making it unsigned breaks the error handling. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm: do not sleep on vblank while holding a mutexIlija Hadzic1-1/+1
drm_wait_vblank must be DRM_UNLOCKED because otherwise it will grab the drm_global_mutex and then go to sleep until the vblank event it is waiting for. That can wreck havoc in the windowing system because if one process issues this ioctl, it will block all other processes for the duration of all vblanks between the current and the one it is waiting for. In some cases it can block the entire windowing system. v2: incorporate comments received from Daniel Vetter and Michel Daenzer. v3/v4: after a lengty discussion with Daniel Vetter, it was concluded that the only thing not yet protected with locks and atomic ops is the write to dev->last_vblank_wait. It's only used in a debug file in proc, and the current code already employs no correct locking: the proc file only takes dev->struct_mutex, whereas drm_wait_vblank implicitly took the drm_global_mutex. Given all this, it's not worth bothering to try to fix the locks at this time. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11MAINTAINERS: exynos: Add EXYNOS DRM maintainer entryKyungmin Park1-0/+7
As Exynos DRM is merged at mainline. Also update the maintainer entry. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm: try to restore previous CRTC config if mode set failsJesse Barnes1-0/+13
We restore the CRTC, encoder, and connector configurations, but if the mode set failed, the attached display may have been turned off, so we need to try set_config again to restore things to the way they were. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm/radeon/kms: make an aux failure debug onlyAlex Deucher1-1/+1
Can happen when there is no DP panel attached, confusing users. Make it debug only. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm: drop select of SLOW_WORKPaul Bolle1-1/+0
slow-work got killed in commit 181a51f6e0. This means that since v2.6.36 there is no Kconfig symbol SLOW_WORK. Apparently selecting that symbol is a nop. Drop that select. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm: serialize access to list of debugfs filesMarcin Slusarz3-5/+16
Nouveau, when configured with debugfs, creates debugfs files for every channel, so structure holding list of files needs to be protected from simultaneous changes by multiple threads. Without this patch it's possible to hit kernel oops in drm_debugfs_remove_files just by running a couple of xterms with looped glxinfo. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm/radeon/kms: fix use of vram scratch page on evergreen/niAlex Deucher1-1/+1
This hunk seems to have gotten lost when I rebased the patch. Reported-by: Sylvain Bertrand <sylvain.bertrand@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm/radeon: Make sure CS mutex is held across GPU reset.Michel Dänzer3-12/+62
This was only the case if the GPU reset was triggered from the CS ioctl, otherwise other processes could happily enter the CS ioctl and wreak havoc during the GPU reset. This is a little complicated because the GPU reset can be triggered from the CS ioctl, in which case we're already holding the mutex, or from other call paths, in which case we need to lock the mutex. AFAICT the mutex API doesn't allow recursive locking or finding out the mutex owner, so we need to handle this with helper functions which allow recursive locking from the same process. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11drm: Ensure string is null terminated.Vinson Lee1-1/+3
Fixes Coverity buffer not null terminated defect. Signed-off-by: Vinson Lee <vlee@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11vmwgfx: Only allow 64x64 cursorsJakob Bornecrantz1-0/+4
Snooping code expects this to be the case. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11vmwgfx: Initialize clip rect loop correctly in surface dirtyJakob Bornecrantz1-2/+3
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11vmwgfx: Close screen object systemJakob Bornecrantz1-1/+4
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11ARM: mach-shmobile: cpuidle single/global and last_state fixesMagnus Damm3-40/+30
The following commits break cpuidle on SH-Mobile ARM: 46bcfad cpuidle: Single/Global registration of idle states e978aa7 cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state This patch remedies these issues by up-porting the SH-Mobile code to fit with the above introduced framework changes. It is worth noting that the new code becomes significantly cleaner, so these framework changes are very welcome. At the same time this breakage could probably have been avoided by grepping for "last_state" and "cpuidle_register_driver". Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11ARM: mach-shmobile: move helper macro PORTCR to sh_pfc.hKuninori Morimoto5-61/+17
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11ARM: mach-shmobile: move helper macro PORT_xx to sh_pfc.hKuninori Morimoto5-197/+140
This patch moves PORT_xx helper macro to sh_pfc.h, and it expects CPU_ALL_PORT() macro for each CPU Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11ARM: mach-shmobile: move helper macro PORT_DATA_xx to sh_pfc.hKuninori Morimoto5-212/+151
This patch move PORT_DATA_xx helper macro to sh_pfc.h. and pfc-sh7372.c used it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11ARM: mach-shmobile: ap4evb: remove white space from end of lineKuninori Morimoto1-1/+1
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11ARM: mach-shmobile: clock-sh7372: remove un-necessary indexKuninori Morimoto1-4/+4
it is not necessary to have sh7372_xxxx index on static variable Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11ARM: mach-shmobile: kota2: add comment out separatorKuninori Morimoto1-0/+7
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11ARM: mach-shmobile: sh73a0: add MMC data pin pull-upKuninori Morimoto3-8/+50
This patch adds MMC data pin pull-up option for pfc-sh73a0.c, and select it on ag5evm board. The MMC read/write will be error without this patch. Cc: Takashi YOSHII <takashi.yoshii.zj@renesas.com> Tested-by: Simon Horman <horms@verge.net.au> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11mailmap: Fix up some renesas attributionsKuninori Morimoto1-0/+2
This adds in entries for both Goda and Morimoto-san who have previously used different conventions. Cc: Yusuke Goda <yusuke.goda.sx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11Merge branches 'sh/pm-runtime' and 'common/clkfwk' into sh-fixes-for-linusPaul Mundt3472-35672/+65364
2011-11-11sh: clkfwk: Kill off remaining debugfs cruft.Paul Mundt2-88/+0
Now that all of the named string association with clocks has been migrated to clkdev lookups there's no meaningful named topology that can be constructed for a debugfs tree view. Get rid of the left over bits, and shrink struct clk a bit in the process. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11drivers: sh: Kill off dead pathname for runtime PM stub.Paul Mundt1-3/+1
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11drivers: sh: Generalize runtime PM platform stub.Paul Mundt3-1/+9
The runtime PM platform support stub in use by ARM-based SH/R-Mobile platforms contains nothing that's specifically ARM-related and instead of wholly generic to anything using the clock framework. The recent runtime PM changes interact rather badly with the lazy disabling of clocks late in the boot process through the clock framework, leading to situations where the runtime suspend/resume paths are entered without a clock being actively driven due to having been lazily gated off. In order to correct this we can trivially tie in the aforementioned stub as a general fallback for all SH platforms that don't presently have their own runtime PM implementations (the corner case being SH-based SH-Mobile platforms, which have their own stub through the hwblk API -- which in turn has bitrotted and will be subsequently adapted to use the same stub as everyone else), regardless of whether the platforms choose to define power domains of their own or not. This fixes up regressions for clock framework users who also build in runtime PM support without any specific power domains of their own, which was previously causing the serial console to be lost when warring with lazy clock disabling. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-11sh: Wire up process_vm syscalls.Paul Mundt4-2/+10
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-11-10Btrfs: fix deadlock caused by the race between relocationMiao Xie1-2/+2
We can not do flushable reservation for the relocation when we create snapshot, because it may make the transaction commit task and the flush task wait for each other and the deadlock happens. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-10Btrfs: only map pages if we know we need them when reading the space cacheJosef Bacik1-7/+10
People have been running into a warning when loading space cache because the page is already mapped when trying to read in a bitmap. The way we read in entries and pages is kind of convoluted, so fix it so that io_ctl_read_entry maps the entries if it needs to, and if it hits the end of the page it simply unmaps the page. That way we can unconditionally unmap the io_ctl before reading in the bitmap and we should stop hitting these warnings. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-10Btrfs: fix orphan backref nodesMiao Xie1-0/+2
If the root node of a fs/file tree is in the block group that is being relocated, but the others are not in the other block groups. when we create a snapshot for this tree between the relocation tree creation ends and ->create_reloc_tree is set to 0, Btrfs will create some backref nodes that are the lowest nodes of the backrefs cache. But we forget to add them into ->leaves list of the backref cache and deal with them, and at last, they will triggered BUG_ON(). kernel BUG at fs/btrfs/relocation.c:239! This patch fixes it by adding them into ->leaves list of backref cache. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-10Btrfs: Abstract similar code for btrfs_block_rsv_add{, _noflush}Miao Xie1-16/+12
btrfs_block_rsv_add{, _noflush}() have similar code, so abstract that code. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-10Btrfs: fix unreleased path in btrfs_orphan_cleanup()Miao Xie1-0/+3
When we did stress test for the space relocation, the deadlock happened. By debugging, We found it was caused by the carelessness that we forgot to unlock the read lock of the extent buffers in btrfs_orphan_cleanup() before we end the transaction handle, so the transaction commit task waited the task, which called btrfs_orphan_cleanup(), to unlock the extent buffer, but that task waited the commit task to end the transaction commit, and the deadlock happened. Fix it. Signed-ff-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-10Btrfs: fix no reserved space for writing out inode cacheMiao Xie1-4/+24
I-node cache forgets to reserve the space when writing out it. And when we do some stress test, such as synctest, it will trigger WARN_ON() in use_block_rsv(). WARNING: at fs/btrfs/extent-tree.c:5718 btrfs_alloc_free_block+0xbf/0x281 [btrfs]() ... Call Trace: [<ffffffff8104df86>] warn_slowpath_common+0x80/0x98 [<ffffffff8104dfb3>] warn_slowpath_null+0x15/0x17 [<ffffffffa0369c60>] btrfs_alloc_free_block+0xbf/0x281 [btrfs] [<ffffffff810cbcb8>] ? __set_page_dirty_nobuffers+0xfe/0x108 [<ffffffffa035c040>] __btrfs_cow_block+0x118/0x3b5 [btrfs] [<ffffffffa035c7ba>] btrfs_cow_block+0x103/0x14e [btrfs] [<ffffffffa035e4c4>] btrfs_search_slot+0x249/0x6a4 [btrfs] [<ffffffffa036d086>] btrfs_lookup_inode+0x2a/0x8a [btrfs] [<ffffffffa03788b7>] btrfs_update_inode+0xaa/0x141 [btrfs] [<ffffffffa036d7ec>] btrfs_save_ino_cache+0xea/0x202 [btrfs] [<ffffffffa03a761e>] ? btrfs_update_reloc_root+0x17e/0x197 [btrfs] [<ffffffffa0373867>] commit_fs_roots+0xaa/0x158 [btrfs] [<ffffffffa03746a6>] btrfs_commit_transaction+0x405/0x731 [btrfs] [<ffffffff810690df>] ? wake_up_bit+0x25/0x25 [<ffffffffa039d652>] ? btrfs_log_dentry_safe+0x43/0x51 [btrfs] [<ffffffffa0381c5f>] btrfs_sync_file+0x16a/0x198 [btrfs] [<ffffffff81122806>] ? mntput+0x21/0x23 [<ffffffff8112d150>] vfs_fsync_range+0x18/0x21 [<ffffffff8112d170>] vfs_fsync+0x17/0x19 [<ffffffff8112d316>] do_fsync+0x29/0x3e [<ffffffff8112d348>] sys_fsync+0xb/0xf [<ffffffff81468352>] system_call_fastpath+0x16/0x1b Sometimes it causes BUG_ON() in the reservation code of the delayed inode is triggered. So we must reserve enough space for inode cache. Note: If we can not reserve the enough space for inode cache, we will give up writing out it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-10Btrfs: fix nocow when deleting the itemMiao Xie1-1/+4
btrfs_previous_item() just search the b+ tree, do not COW the nodes or leaves, if we modify the result of it, the meta-data will be broken. fix it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-10Merge branch 'mount-fixes' of git://github.com/idryomov/btrfs-unstable into ↵Chris Mason2-46/+43
integration
2011-11-10Btrfs: tweak the delayed inode reservations againChris Mason2-26/+47
Josef sent along an incremental to the inode reservation code to make sure we try and fall back to directly updating the inode item if things go horribly wrong. This reworks that patch slightly, adding a fallback function that will always try to update the inode item directly without going through the delayed_inode code. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-11crypto: algapi - Fix build problem with NET disabledHerbert Xu7-0/+63
The report functions use NLA_PUT so we need to ensure that NET is enabled. Reported-by: Luis Henriques <henrix@camandro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2011-11-10pata_of_platform: Don't use NO_IRQAnton Vorontsov1-1/+1
Drivers should not use NO_IRQ; moreover, some architectures don't have it nowadays. '0' is the 'no irq' case. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-11-10Merge branch 'fix/misc' into for-linusTakashi Iwai9-47/+123
2011-11-10ALSA: usb-audio: Use kmemdup rather than duplicating its implementationThomas Meyer1-4/+3
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10MIPS: ASID conflict after CPU hotplugMaksim Rayskiy1-1/+2
I am running SMP Linux 2.6.37-rc1 on BMIPS5000 (single core dual thread) and observe some abnormalities when doing system suspend/resume which I narrowed down to cpu hotplugging. The suspend brings the second thread processor down and then restarts it, after which I see memory corruption in userspace. I started digging and found out that problem occurs because while doing execve() the child process is getting the same ASID as the parent, which obviously corrupts parent's address space. Further digging showed that activate_mm() calls get_new_mmu_context() to get a new ASID, but at this time ASID field in entryHi is 1, and asid_cache(cpu) is 0x100 (it was just reset to ASID_FIRST_VERSION when the secondary TP was booting). So, get_new_mmu_context() increments the asid_cache(cpu) value to 0x101, and thus puts 0x01 into entryHi. The result - ASID field does not get changed as it was supposed to. My solution is very simple - do not reset asid_cache(cpu) on TP warm restart. Patchwork: https://patchwork.linux-mips.org/patch/1797/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-11-10MIPS: Octeon: Fix compile error in arch/mips/cavium-octeon/flash_setup.cDavid Daney1-7/+2
The parse_mtd_partitions() and mtd_device_register() functions were combined into mtd_device_parse_register(). So call that instead. Signed-off-by: David Daney <david.daney@cavium.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2923/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-11-10MIPS: errloongson2_clock: Fix build error by including linux/module.hAaro Koskinen1-0/+1
Fix the following compilation failure with v3.2-rc1 by including module.h: CC [M] arch/mips/kernel/cpufreq/loongson2_clock.o arch/mips/kernel/cpufreq/loongson2_clock.c:39:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:39:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:39:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:51:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:51:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:51:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:71:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:71:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:71:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:76:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:76:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:76:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:82:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:82:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:82:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:87:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:87:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:87:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:93:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:93:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:93:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:131:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:131:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:131:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:147:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:147:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:147:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:166:1: error: data definition has no type or storage class [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:166:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' [-Werror=implicit-int] arch/mips/kernel/cpufreq/loongson2_clock.c:166:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/cpufreq/loongson2_clock.c:168:15: error: expected declaration specifiers or '...' before string constant arch/mips/kernel/cpufreq/loongson2_clock.c:169:20: error: expected declaration specifiers or '...' before string constant arch/mips/kernel/cpufreq/loongson2_clock.c:170:16: error: expected declaration specifiers or '...' before string constant Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> To: linux-mips@linux-mips.org To: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/2922/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-11-10ALSA: hda - Re-enable the check NO_PRESENCE misc bitTakashi Iwai3-7/+14
We disabled the check of NO_PRESENCE bit of the default pin-config in commit f4419172 temporarily. One problem was that the first implementation was wrong -- the bit after the shift must be checked. However, this would still give many regressions on machines with broken BIOS. They set this bit wrongly even on active pins. A workaround is to check whether all pins contain this bit. As far as I've checked, broken BIOSen set this bit on all pins, no matter whether active or not. In such a case, the driver should ignore this bit check. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10ALSA: vmaster - Free slave-links when freeing the master elementTakashi Iwai1-4/+14
When freeing the vmaster master element, we should release slave-links properly, not only assumig that slaves will be freed soon later. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10ALSA: hda - Don't add elements of other codecs to vmaster slaveTakashi Iwai1-21/+39
When a virtual mater control is created, the driver looks for slave elements from the assigned card instance. But this may include the elements of other codecs when multiple codecs are on the same HD-audio bus. This works at the first time, but it'll give Oops when it's once freed and re-created via reconfig sysfs. This patch changes the element-look-up strategy to limit only to the mixer elements of the same codec. Reported-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10pinctrl: hide subsystem from the populaceLinus Walleij1-15/+7
Machines that have embedded pin controllers need to select them explicitly, so why broadcast their config options to menuconfig. We provide a helpful submenu for those machines that do select it, making it possible to enable debugging for example. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-11-09Merge remote-tracking branch 'konrad-xen/testing' into xen/next-3.2Jeremy Fitzhardinge93-1688/+6623
* konrad-xen/testing: (123 commits) pvhvm: compile error. x86/microcode: check proper return code. xen/v86d: Fix /dev/mem to access memory below 1MB xen/pvhvm: Use default_idle on pm_idle call. xen/pm_idle: Make pm_idle call default_idle cpuidle: If pm_idle is not set and cpuidle is turned off, use the default_idle xen: document balloon driver sysfs files ttm:dma: Add 'ttm_dma' module to radeon and nouveau to force enable the TTM DMA drm/nouveau: enable the TTM DMA pool on 32-bit DMA only device V2 drm/radeon/kms: Enable the TTM DMA pool if swiotlb is on V2 swiotlb: Expose swiotlb_nr_tlb function to modules ttm: Provide DMA aware TTM page pool code. V5 drm/ttm: introduce callback for ttm_tt populate & unpopulate V2 drm/ttm: merge ttm_backend and ttm_tt V2 drm/ttm: test for dma_address array allocation failure drm/ttm: convert page allocation to use page ptr array instead of list V4 drm/ttm: overhaul memory accounting drm/ttm: use ttm put pages function to properly restore cache attribute drm/ttm: remove unused backend flags field drm/ttm: remove split btw highmen and lowmem page ...
2011-11-09Merge branch 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm ↵Olof Johansson5-6/+11
into fixes
2011-11-09Revert "proc: fix races against execve() of /proc/PID/fd**"Linus Torvalds1-103/+43
This reverts commit aa6afca5bcaba8101f3ea09d5c3e4100b2b9f0e5. It escalates of some of the google-chrome SELinux problems with ptrace ("Check failed: pid_ > 0. Did not find zygote process"), and Andrew says that it is also causing mystery lockdep reports. Reported-by: Alex Villacís Lasso <a_villacis@palosanto.com> Requested-by: James Morris <jmorris@namei.org> Requested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-10drm/nouveau: Fix bandwidth calculation for DisplayPortAdam Jackson1-1/+1
Ported from the equivalent fix in drm-intel-next: http://cgit.freedesktop.org/~keithp/linux/commit/?h=drm-intel-next&id=cd9dde44f47501394b9f0715b6a36a92aa74c0d0 Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nouveau: by default use low bpp framebuffer on low memory cardsMarcin Slusarz1-1/+10
Framebuffer's BPP is not that important but can waste significant part of memory on low-VRAM cards. Lower it to 8bpp on < 32MB cards and to 16bpp on 64MB cards. It can still be overridden by video= option. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv10: Change the BO size threshold determining the memory placement range.Francisco Jerez1-1/+1
Fixes the framebuffer memory allocation failure seen on some low-memory cards, followed by X refusing to start. https://bugs.freedesktop.org/show_bug.cgi?id=42384 Reported-by: Chris Paulson-Ellis <chris@edesix.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc0: enable acceleration for nvc1 by defaultBen Skeggs1-1/+3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc0/gr: fixup the mmio list register writes for 0xc1Ben Skeggs1-9/+32
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc1: hacky workaround to fix accel issuesBen Skeggs1-0/+8
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc0/gr: fix some bugs in grctx generationBen Skeggs1-17/+14
Most serious is for chips with only 1 TPC, we'd get stuck in an infinite loop. The fix here will slightly change the setup for all other chipsets too, but, it shouldn't matter too much, and this all needs figuring out and likely redone anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc0: enable acceleration on 0xc8 by defaultBen Skeggs1-1/+0
Worked well enough for glxgears and gnome-shell at least, no reason to have this off anymore. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc0/vram: skip disabled PBFB subunitsBen Skeggs1-5/+9
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv40/pm: fix issues on igp chipsets, which don't have memoryBen Skeggs1-5/+15
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nouveau: testing the wrong variableDan Carpenter1-1/+1
memtimings is a valid pointer here, the intent was to test for kcalloc() failure. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc0/vram: storage type 0xc3 is not compressedChristoph Bumiller1-1/+1
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv50: fix stability issue on NV86.Maxim Levitsky1-1/+1
Confirmed to fix random hangs while running all Unegine demos on NV86. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nouveau: initialize chan->fence.lock before useMarcin Slusarz2-2/+1
Fence lock needs to be initialized before any call to nouveau_channel_put because it calls nouveau_channel_idle->nouveau_fence_update which uses fence lock. BUG: spinlock bad magic on CPU#0, test/24134 lock: ffff88019f90dba8, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Pid: 24134, comm: test Not tainted 3.0.0-nv+ #800 Call Trace: spin_bug+0x9c/0xa3 do_raw_spin_lock+0x29/0x13c _raw_spin_lock+0x1e/0x22 nouveau_fence_update+0x2d/0xf1 nouveau_channel_idle+0x22/0xa0 nouveau_channel_put_unlocked+0x84/0x1bd nouveau_channel_put+0x20/0x24 nouveau_channel_alloc+0x4ec/0x585 nouveau_ioctl_fifo_alloc+0x50/0x130 drm_ioctl+0x289/0x361 do_vfs_ioctl+0x4dd/0x52c sys_ioctl+0x42/0x65 system_call_fastpath+0x16/0x1b It's easily triggerable from userspace. Additionally remove double initialization of chan->fence.pending. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: stable@kernel.org Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv50/vram: fix incorrect detection of bank count on newer chipsetsBen Skeggs1-1/+1
NVA3+ has an extra bit here compared to NV50:NVA3 chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv50/gr: typo fix, how about we not reset fifo during graph init?Ben Skeggs1-2/+2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv50/bios: fixup mpll programming from the init table parserBen Skeggs1-9/+13
Reportedly this has been causing stability and corruption issues after resuming from suspend for a few people. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify()Ben Skeggs1-1/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm: make sure drm_vblank_init() has been called before touching vbl_lockBen Skeggs1-6/+9
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-09pvhvm: compile error.Konrad Rzeszutek Wilk1-0/+1
2011-11-09Merge branch 'devel/ttm.dma_pool.v2.5' into testingKonrad Rzeszutek Wilk31-1276/+2081
* devel/ttm.dma_pool.v2.5: ttm:dma: Add 'ttm_dma' module to radeon and nouveau to force enable the TTM DMA drm/nouveau: enable the TTM DMA pool on 32-bit DMA only device V2 drm/radeon/kms: Enable the TTM DMA pool if swiotlb is on V2 swiotlb: Expose swiotlb_nr_tlb function to modules ttm: Provide DMA aware TTM page pool code. V5 drm/ttm: introduce callback for ttm_tt populate & unpopulate V2 drm/ttm: merge ttm_backend and ttm_tt V2 drm/ttm: test for dma_address array allocation failure drm/ttm: convert page allocation to use page ptr array instead of list V4 drm/ttm: overhaul memory accounting drm/ttm: use ttm put pages function to properly restore cache attribute drm/ttm: remove unused backend flags field drm/ttm: remove split btw highmen and lowmem page drm/ttm: remove userspace backed ttm object support Conflicts: drivers/gpu/drm/radeon/radeon_drv.c drivers/gpu/drm/radeon/radeon_gart.c
2011-11-09Merge branch 'stable/misc' into testingKonrad Rzeszutek Wilk6-4/+225
* stable/misc: x86/microcode: check proper return code. xen/v86d: Fix /dev/mem to access memory below 1MB xen: add CPU microcode update driver xen: add dom0_op hypercall xen/acpi: Domain0 acpi parser related platform hypercall Conflicts: arch/x86/xen/Kconfig
2011-11-09Merge branches 'devel/for-jens-3.3' and 'devel/xen-scsi.v1.0' into testingKonrad Rzeszutek Wilk20-96/+3420
* devel/for-jens-3.3: xen/blkback: Move processing of BLKIF_OP_DISCARD from dispatch_rw_block_io xen/blk[front|back]: Enhance discard support with secure erasing support. xen/blk[front|back]: Squash blkif_request_rw and blkif_request_discard together block: xen-blkback: use API provided by xenbus module to map rings * devel/xen-scsi.v1.0: xen-scsi[front|back]: Fix warnings and bugs. xen/scsi[front|back]: Forgot .owner attribute. xen/scsi[front|back]: Initial commit from Novell SLES11SP1 2.6.32 tree.
2011-11-09Merge branches 'stable/for-linus-fixes-3.2', 'stable/for-x86', ↵Konrad Rzeszutek Wilk16-37/+135
'stable/for-gregkh-3.2', 'stable/for-x86' and 'devel/pm-idle-fixes-for-3.2' into testing * stable/for-linus-fixes-3.2: xen-gntalloc: signedness bug in add_grefs() xen-gntalloc: integer overflow in gntalloc_ioctl_alloc() xen-gntdev: integer overflow in gntdev_alloc_map() xen:pvhvm: enable PVHVM VCPU placement when using more than 32 CPUs. xen/balloon: Avoid OOM when requesting highmem xen: Remove hanging references to CONFIG_XEN_PLATFORM_PCI xen: map foreign pages for shared rings by updating the PTEs directly * stable/for-x86: x86/paravirt: Use pte_val instead of pte_flags on CPA pageattr_test x86/cpa: Use pte_attrs instead of pte_flags on CPA/set_p.._wb/wc operations. cpuidle: If disable_cpuidle() is called, set pm_idle to default_idle. * stable/for-gregkh-3.2: xen: document balloon driver sysfs files * stable/for-x86: x86/paravirt: Use pte_val instead of pte_flags on CPA pageattr_test x86/cpa: Use pte_attrs instead of pte_flags on CPA/set_p.._wb/wc operations. cpuidle: If disable_cpuidle() is called, set pm_idle to default_idle. * devel/pm-idle-fixes-for-3.2: xen/pvhvm: Use default_idle on pm_idle call. xen/pm_idle: Make pm_idle call default_idle cpuidle: If pm_idle is not set and cpuidle is turned off, use the default_idle
2011-11-09Merge branch 'for-3.2/fixes' of ↵Olof Johansson6-12/+27
git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra into fixes
2011-11-09x86/microcode: check proper return code.Ben Guthro1-1/+1
After pulling in this change from your tree, I found the following bug, when checking an enum value, which should be considered before inclusion: Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09Merge branch 'upstream/microcode' of ↵Konrad Rzeszutek Wilk10-1/+547
git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen into stable/misc * 'upstream/microcode' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: xen: add CPU microcode update driver xen: add dom0_op hypercall xen/acpi: Domain0 acpi parser related platform hypercall
2011-11-09xen/v86d: Fix /dev/mem to access memory below 1MBKonrad Rzeszutek Wilk1-3/+8
We need to provide the VM_IO (and _PAGE_IOMAP) to see the contents of the memory below 1MB. Reported-and-Tested-by: Ben Guthro <ben.guthro@virtualcomputer.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09xen/pvhvm: Use default_idle on pm_idle call.Konrad Rzeszutek Wilk1-0/+4
..instead of: acpi_cpuidle, cpuidle_idle, amd_e400_idle, or mwait_idle. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09xen/pm_idle: Make pm_idle call default_idleKonrad Rzeszutek Wilk1-1/+1
This patch: commit d91ee5863b71e8c90eaf6035bff3078a85e2e7b5 Author: Len Brown <len.brown@intel.com> Date: Fri Apr 1 18:28:35 2011 -0400 cpuidle: replace xen access to x86 pm_idle and default_idle ..scribble on pm_idle and access default_idle, have it simply disable_cpuidle() so acpi_idle will not load and architecture default HLT will be used. idea was to have one call - disable_cpuidle() which would make pm_idle not be molested by other code. Sadly it falls short of that and only dissallows cpuidle_idle_call and acpi_idle_call to not set pm_idle (which is good!). The amd_e400_idle and mwait_idle can still setup pm_idle which we really do not want. So lets make pm_idle be stuck to default_idle and that will thwart other generic code to overriding it. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09cpuidle: If pm_idle is not set and cpuidle is turned off, use the default_idleKonrad Rzeszutek Wilk2-0/+7
Otherwise we might end up not adhering to the disable_idle() which might turn the idle loop off. This is a regression introduced by commit a0bfa1373859e9d11dc92561a8667588803e42d8 Author: Len Brown <len.brown@intel.com> Date: Fri Apr 1 19:34:59 2011 -0400 cpuidle: stop depending on pm_idle and under Xen, this particular patch: commit d91ee5863b71e8c90eaf6035bff3078a85e2e7b5 Author: Len Brown <len.brown@intel.com> Date: Fri Apr 1 18:28:35 2011 -0400 cpuidle: replace xen access to x86 pm_idle and default_idle ends up in the situation that select_idle_routine() is called from arch/x86/kernel/cpu/common.c and since Xen setup does not set pm_idle anymore, it can cause mwait_idle or amd_e400_idle functions to be selected. It seems that select_idle_routine() was not thought off when the cleanup was thought off. This patch uses the cpuidle_disabled() functionality and adhere to that. Reported-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09xen: document balloon driver sysfs filesDavid Vrabel1-0/+77
Add ABI documentation for the balloon driver's sysfs files. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Daniel Kiper <dkiper@net-space.pl> [v2: Added comments from Daniel] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09Btrfs: rework error handling in btrfs_mount()Ilya Dryomov1-21/+21
Commits 6c41761f and 45ea6095 introduced the possibility of NULL pointer dereference on error paths, also we would leave all devices busy and leak fs_info with all sub-structures on error when trying to mount an already mounted fs to a different directory. Fix this by doing all allocations before trying to open any of the devices, adjust error path for mount-already-mounted-fs case. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2011-11-09Btrfs: close devices on all error paths in open_ctree()Ilya Dryomov1-4/+3
Fix a bug introduced by 7e662854 where we would leave devices busy on certain error paths in open_ctree(). fs_info is guaranteed to be non-NULL now so it's safe to dereference it on all error paths. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2011-11-09Btrfs: avoid null dereference and leaks when bailing from open_ctree()Ilya Dryomov1-20/+15
Fix bugs introduced by 6c41761f. Firstly, after failing to allocate any of the tree roots (first 'goto fail' in open_ctree()) we would dereference a NULL fs_info pointer in free_fs_info(). Secondly, after failures from init_srcu_struct(), setup_bdi() and new_inode() we would leak all earlier allocated roots: fs_info fields haven't been initialized yet so free_fs_info() is rendered useless. Fix this by initializing fs_info pointer and fs_info fields before any allocations happen. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2011-11-09Btrfs: fix subvol_name leak on error in btrfs_mount()Ilya Dryomov1-1/+3
btrfs_parse_early_options() can fail due to error while scanning devices (-o device= option), but still strdup() subvol_name string: mount -o subvol=SUBV,device=BAD_DEVICE <dev> <mnt> So free subvol_name string on error. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2011-11-09Btrfs: fix memory leak in btrfs_parse_early_options()Ilya Dryomov1-0/+1
Don't leak subvol_name string in case multiple subvol= options are given. "The lastest option is effective" behavior (consistent with subvolid= and subvolrootid= options) is preserved. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2011-11-09ttm:dma: Add 'ttm_dma' module to radeon and nouveau to force enable the TTM DMAKonrad Rzeszutek Wilk6-5/+15
.. irregardless of whether the device is restricted to DMA32. This patch is for testing purposes. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/nouveau: enable the TTM DMA pool on 32-bit DMA only device V2Konrad Rzeszutek Wilk4-61/+79
If the card is capable of more than 32-bit, then use the default TTM page pool code which allocates from anywhere in the memory. Note: If the 'ttm.no_dma' parameter is set, the override is ignored and the default TTM pool is used. V2 use pci_set_consistent_dma_mask CC: Ben Skeggs <bskeggs@redhat.com> CC: Francisco Jerez <currojerez@riseup.net> CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2011-11-09drm/radeon/kms: Enable the TTM DMA pool if swiotlb is on V2Konrad Rzeszutek Wilk4-35/+84
With the exception that we do not handle the AGP case. We only deal with PCIe cards such as ATI ES1000 or HD3200 that have been detected to only do DMA up to 32-bits. V2 force dma32 if we fail to set bigger dma mask CC: Dave Airlie <airlied@redhat.com> CC: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2011-11-09swiotlb: Expose swiotlb_nr_tlb function to modulesKonrad Rzeszutek Wilk3-4/+5
As a mechanism to detect whether SWIOTLB is enabled or not. We also fix the spelling - it was swioltb instead of swiotlb. CC: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [v1: Ripped out swiotlb_enabled] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09ttm: Provide DMA aware TTM page pool code. V5Konrad Rzeszutek Wilk5-0/+1279
In TTM world the pages for the graphic drivers are kept in three different pools: write combined, uncached, and cached (write-back). When the pages are used by the graphic driver the graphic adapter via its built in MMU (or AGP) programs these pages in. The programming requires the virtual address (from the graphic adapter perspective) and the physical address (either System RAM or the memory on the card) which is obtained using the pci_map_* calls (which does the virtual to physical - or bus address translation). During the graphic application's "life" those pages can be shuffled around, swapped out to disk, moved from the VRAM to System RAM or vice-versa. This all works with the existing TTM pool code - except when we want to use the software IOTLB (SWIOTLB) code to "map" the physical addresses to the graphic adapter MMU. We end up programming the bounce buffer's physical address instead of the TTM pool memory's and get a non-worky driver. There are two solutions: 1) using the DMA API to allocate pages that are screened by the DMA API, or 2) using the pci_sync_* calls to copy the pages from the bounce-buffer and back. This patch fixes the issue by allocating pages using the DMA API. The second is a viable option - but it has performance drawbacks and potential correctness issues - think of the write cache page being bounced (SWIOTLB->TTM), the WC is set on the TTM page and the copy from SWIOTLB not making it to the TTM page until the page has been recycled in the pool (and used by another application). The bounce buffer does not get activated often - only in cases where we have a 32-bit capable card and we want to use a page that is allocated above the 4GB limit. The bounce buffer offers the solution of copying the contents of that 4GB page to an location below 4GB and then back when the operation has been completed (or vice-versa). This is done by using the 'pci_sync_*' calls. Note: If you look carefully enough in the existing TTM page pool code you will notice the GFP_DMA32 flag is used - which should guarantee that the provided page is under 4GB. It certainly is the case, except this gets ignored in two cases: - If user specifies 'swiotlb=force' which bounces _every_ page. - If user is using a Xen's PV Linux guest (which uses the SWIOTLB and the underlaying PFN's aren't necessarily under 4GB). To not have this extra copying done the other option is to allocate the pages using the DMA API so that there is not need to map the page and perform the expensive 'pci_sync_*' calls. This DMA API capable TTM pool requires for this the 'struct device' to properly call the DMA API. It also has to track the virtual and bus address of the page being handed out in case it ends up being swapped out or de-allocated - to make sure it is de-allocated using the proper's 'struct device'. Implementation wise the code keeps two lists: one that is attached to the 'struct device' (via the dev->dma_pools list) and a global one to be used when the 'struct device' is unavailable (think shrinker code). The global list can iterate over all of the 'struct device' and its associated dma_pool. The list in dev->dma_pools can only iterate the device's dma_pool. /[struct device_pool]\ /---------------------------------------------------| dev | / +-------| dma_pool | /-----+------\ / \--------------------/ |struct device| /-->[struct dma_pool for WC]</ /[struct device_pool]\ | dma_pools +----+ /-| dev | | ... | \--->[struct dma_pool for uncached]<-/--| dma_pool | \-----+------/ / \--------------------/ \----------------------------------------------/ [Two pools associated with the device (WC and UC), and the parallel list containing the 'struct dev' and 'struct dma_pool' entries] The maximum amount of dma pools a device can have is six: write-combined, uncached, and cached; then there are the DMA32 variants which are: write-combined dma32, uncached dma32, and cached dma32. Currently this code only gets activated when any variant of the SWIOTLB IOMMU code is running (Intel without VT-d, AMD without GART, IBM Calgary and Xen PV with PCI devices). Tested-by: Michel Dänzer <michel@daenzer.net> [v1: Using swiotlb_nr_tbl instead of swiotlb_enabled] [v2: Major overhaul - added 'inuse_list' to seperate used from inuse and reorder the order of lists to get better performance.] [v3: Added comments/and some logic based on review, Added Jerome tag] [v4: rebase on top of ttm_tt & ttm_backend merge] [v5: rebase on top of ttm memory accounting overhaul] Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/ttm: introduce callback for ttm_tt populate & unpopulate V2Jerome Glisse9-119/+123
Move the page allocation and freeing to driver callback and provide ttm code helper function for those. Most intrusive change, is the fact that we now only fully populate an object this simplify some of code designed around the page fault design. V2 Rebase on top of memory accounting overhaul Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/ttm: merge ttm_backend and ttm_tt V2Jerome Glisse9-461/+295
ttm_backend will exist only and only with a ttm_tt, and ttm_tt will be of interesting use only when bind to a backend. Thus to avoid code & data duplication btw the two merge them. V2 Rebase on top of memory accountign overhaul Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/ttm: test for dma_address array allocation failureJerome Glisse1-1/+1
Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/ttm: convert page allocation to use page ptr array instead of list V4Jerome Glisse5-115/+120
Use the ttm_tt page ptr array for page allocation, move the list to array unwinding into the page allocation functions. V2 split the fix to use ttm put page as a separate fix properly fill pages array when TTM_PAGE_FLAG_ZERO_ALLOC is not set V3 Added back page_count()==1 check when freeing page V4 Rebase on top of memory accounting overhaul Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/ttm: overhaul memory accountingJerome Glisse7-395/+168
This is an overhaul of the ttm memory accounting. This tries to keep the same global behavior while removing the whole zone concept. It keeps a distrinction for dma32 so that we make sure that ttm don't starve the dma32 zone. There is 3 threshold for memory allocation : - max_mem is the maximum memory the whole ttm infrastructure is going to allow allocation for (exception of system process see below) - emer_mem is the maximum memory allowed for system process, this limit is > to max_mem - swap_limit is the threshold at which point ttm will start to try to swap object because ttm is getting close the max_mem limit - swap_dma32_limit is the threshold at which point ttm will start swap object to try to reduce the pressure on the dma32 zone. Note that we don't specificly target object to swap to it might very well free more memory from highmem rather than from dma32 Accounting is done through used_mem & used_dma32_mem, which sum give the total amount of memory actually accounted by ttm. Idea is that allocation will fail if (used_mem + used_dma32_mem) > max_mem and if swapping fail to make enough room. The used_dma32_mem can be updated as a later stage, allowing to perform accounting test before allocating a whole batch of pages. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/ttm: use ttm put pages function to properly restore cache attributeJerome Glisse1-1/+4
On failure we need to make sure the page we free has wb cache attribute. Do this pas call the proper ttm page helper function. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/ttm: remove unused backend flags fieldJerome Glisse2-3/+0
This field is not use by any of the driver just drop it. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/ttm: remove split btw highmen and lowmem pageJerome Glisse2-16/+2
Split btw highmem and lowmem page was rendered useless by the pool code. Remove it. Note further cleanup would change the ttm page allocation helper to actualy take an array instead of relying on list this could drasticly reduce the number of function call in the common case of allocation whole buffer. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09drm/ttm: remove userspace backed ttm object supportJerome Glisse4-155/+1
This was never use in none of the driver, properly using userspace page for bo would need more code (vma interaction mostly). Removing this dead code in preparation of ttm_tt & backend merge. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09arm/tegra: enable headphone detection gpio on seaboardYufeng Shen1-0/+1
Enable the headphone detection gpio on tegra platform. Signed-off-by: Yufeng Shen <miletus@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2011-11-09arm/dt: Fix ventana SDHCI power-gpiosStephen Warren1-2/+1
Ventana uses the same SDHCI GPIOs as Seaboard; PI6 (70) is the power GPIO for the SD port, and there is no power GPIO for the MMC chip. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2011-11-09arm/tegra: Don't create duplicate gpio and pinmux devicesStephen Warren5-10/+25
*_pinmux_init() register the GPIO and pinmux devices so that they're ready before any other device needs them. *_pinmux_init() are also called by board-dt.c in order to set up the GPIO and pinmux configurations. In this case, if we register the devices, they end up being probed once due to this registration, and a second time due to a device-tree node (or vice-versa). The second probe fails since the memory regions are already requested. Besides, we don't actually want the duplicated devices. To avoid this duplicate registration, modify *_pinmux_init() to check whether it's running on a DT machine. If not, register the pinmux devices. If so, don't register them. Finally, modify board-dt.c to call the *_pinmux_init() after all devices have been instantiated from device-tree. This allows the GPIO and pinmux devices to be instantiated and initialized before calling functions to configure the hardware. This has one disadvantage: The pinmux and GPIO initialization now happens after /all/ devices are instantiated, rather than after just gpio and pinmux but before anything else. So the correct HW configuration is not in place when e.g. the SD/MMC device is probed. Long-term, this should be solved by doing both: a) Initializing the HW state from DT nodes during GPIO and pinmux device probe. b) Using the deferred driver probe mechanism, so that drivers can defer their probe until after the gpio and pinmux drivers have probed. v2: s/int is_dt/bool is_dt/ v3: Use of_machine_is_compatible inside *_pinmux_init() rather than passing an explicit parameter into the function from outside. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2011-11-09ALSA: intel8x0: improve virtual environment detectionKonstantin Ozerkov1-10/+31
Detection code improved by PCI SSID usage. VM optimization now enabled only for known devcices (skip host devices forwarded to VM by VT-d or same kind of technology). For debug/troubleshooting purposes optimization can be forced (on/off) by module parameter: "inside_vm" (boolean). Known devices (PCI SSID): 1af4:1100: Reserved for KVM devices. Note this is not yet implemented for KVM's ICH/AC'97 emulation. 1ab8:xxxx: Parallels ICH/AC'97 emulated sound. [ fixed a minor coding-style issue by tiwai] Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: intel8x0: move virtual environment detection code into one placeKonstantin Ozerkov1-11/+19
This is refactoring patch: preparation for add improved detection code. Now all detection code placed in one place. Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09STAGING: octeon-ethernet: Fix compile error caused by skb_frag_struct changeDavid Daney1-1/+1
Evidently the definition of struct skb_frag_struct has changed, so we need to change to match it. Signed-off-by: David Daney <david.daney@cavium.com> To: netdev@vger.kernel.org To: gregkh@suse.de To: devel@driverdev.osuosl.org Patchwork: https://patchwork.linux-mips.org/patch/2909/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-11-09Merge branch 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixesOlof Johansson10-27/+23
2011-11-09Merge branch 'imx/compile-fixes' of ↵Olof Johansson5-12/+6
git://git.linaro.org/people/shawnguo/linux-2.6 into fixes
2011-11-09Merge branch 'mxs/fixes' of git://git.linaro.org/people/shawnguo/linux-2.6 ↵Olof Johansson1-2/+2
into fixes
2011-11-09ARM: at91: Fix USBA gadget registrationJochen Friedrich3-3/+3
Since 193ab2a6070039e7ee2b9b9bebea754a7c52fd1b, various AT91 boards don't register USBA adapters anymore due to depending on a now non-existing symbol. Fix the symbol name. Signed-off-by: Jochen Friedrich <jochen@scram.de> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> CC: stable@kernel.org Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-11-09atmel/spi: fix missing probeJean-Christophe PLAGNIOL-VILLARD1-2/+3
Commit 940ab889 "drivercore: Add helper macro for platform_driver boilerplate" converted this driver to use module_platform_driver, but due to the use of platform_driver_probe(), this resulted in the call to atmel_spi_probe being lost. Place the call to this function into the driver structure. fix section missmatch atmel_spi_probe is marked __init where it's supposed to be __devinit atmel_spi_remove is marked __exit where it's supposed to be __devexit Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2011-11-09at91/yl-9200: Fix section mismatchJean-Christophe PLAGNIOL-VILLARD1-1/+1
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-11-09at91: vmalloc fix missing AT91_VIRT_BASE defineJean-Christophe PLAGNIOL-VILLARD1-0/+2
VMALLOC_END is defined in terms of AT91_VIRT_BASE but this needs mach/hardware.h for it's definition. In file included from arch/arm/mach-at91/board-usb-a926x.c:26:0: include/linux/mm.h: In function 'is_vmalloc_addr': include/linux/mm.h:305:41: error: 'AT91_VIRT_BASE' undeclared (first use in this function) include/linux/mm.h:305:41: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
2011-11-09ARM: at91: usart: drop static map regs for dbguJean-Christophe PLAGNIOL-VILLARD7-21/+14
In commit fb149f9e28354 we introduce ioremap support for static map_io, we do not need this register entry anymore. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2011-11-09xen-gntalloc: signedness bug in add_grefs()Dan Carpenter1-1/+1
gref->gref_id is unsigned so the error handling didn't work. gnttab_grant_foreign_access() returns an int type, so we can add a cast here, and it doesn't cause any problems. gnttab_grant_foreign_access() can return a variety of errors including -ENOSPC, -ENOSYS and -ENOMEM. CC: stable@kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09xen-gntalloc: integer overflow in gntalloc_ioctl_alloc()Dan Carpenter1-1/+1
On 32 bit systems a high value of op.count could lead to an integer overflow in the kzalloc() and gref_ids would be smaller than expected. If the you triggered another integer overflow in "if (gref_size + op.count > limit)" then you'd probably get memory corruption inside add_grefs(). CC: stable@kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09xen-gntdev: integer overflow in gntdev_alloc_map()Dan Carpenter1-5/+5
The multiplications here can overflow resulting in smaller buffer sizes than expected. "count" comes from a copy_from_user(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09xen:pvhvm: enable PVHVM VCPU placement when using more than 32 CPUs.Zhenzhong Duan1-2/+1
PVHVM running with more than 32 vcpus and pv_irq/pv_time enabled need VCPU placement to work, or else it will softlockup. CC: stable@kernel.org Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09xen/balloon: Avoid OOM when requesting highmemDaniel De Graaf1-2/+2
If highmem pages are requested from the balloon on a system without highmem, the implementation of alloc_xenballooned_pages will allocate all available memory trying to find highmem pages to return. Allow low memory to be returned when highmem pages are requested to avoid this loop. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09xen: Remove hanging references to CONFIG_XEN_PLATFORM_PCIDaniel De Graaf1-4/+2
In 5fbdc10395cd500d6ff844825a918c4e6f38de37 the XEN_PLATFORM_PCI config option was removed, but references in header files remained. Clean up those references. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09pinctrl: fix "warning: 'struct pinctrl_dev' declared inside parameter list"Barry Song1-0/+1
when pinctl subsystem is not selected, when compiling drivers including the include/linux/pinctrl/pinctrl.h, we will get the warning as below: In file included from include/linux/pinctrl/pinmux.h:17, from drivers/tty/serial/sirfsoc_uart.c:25: include/linux/pinctrl/pinctrl.h:126: warning: 'struct pinctrl_dev' declared inside parameter list include/linux/pinctrl/pinctrl.h:126: warning: its scope is only this definition or declaration, which is probably not what you want Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-11-09xen: map foreign pages for shared rings by updating the PTEs directlyDavid Vrabel4-19/+23
When mapping a foreign page with xenbus_map_ring_valloc() with the GNTTABOP_map_grant_ref hypercall, set the GNTMAP_contains_pte flag and pass a pointer to the PTE (in init_mm). After the page is mapped, the usual fault mechanism can be used to update additional MMs. This allows the vmalloc_sync_all() to be removed from alloc_vm_area(). Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-09kbuild: Fix missing system calls check on mips.David Daney2-3/+3
Commit 5f7efb4 (Kbuild: append missing-syscalls to the default target list) broke MIPS build. Reported-tested-and-acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-11-09ALSA: snd_usb_audio: add Logitech HD Webcam c510 to quirk-384Alexey Fisher1-0/+1
Logitech HD Webcam c510 provide wrong mixer resolution. Add it to "res = 384" quirk. Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda - fix internal mic on Dell Vostro 3500 laptopJulian Wollrath2-0/+12
Fix the not working internal mic on Dell Vostro 3500 laptop by introducing the new model dell-vostro-3500. Signed-off-by: Julian Wollrath <jwollrath@web.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ARM: picoxcell: add extra temp register to addruartJamie Iles1-1/+1
639da5ee3 (ARM: add an extra temp register to the low level debugging addruart macro) didn't include picoxcell as it hadn't been merged at the time. Fix up the compile breakage by adding the extra temp parameter. Signed-off-by: Jamie Iles <jamie@jamieiles.com>
2011-11-09Merge branch 'fix/asoc' into for-linusTakashi Iwai3-15/+45
2011-11-09ALSA: HDA: Remove quirk for Toshiba T110David Henningsson1-1/+0
According to the bug reporter, model=auto is needed to make the internal microphone work. BugLink: https://bugs.launchpad.net/bugs/819699 Reported-by: Andrej (agno01) Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08Merge branch 'upstream/pvticketlock-slowflag' into xen/next-3.2Jeremy Fitzhardinge10-342/+252
* upstream/pvticketlock-slowflag: xen: enable PV ticketlocks on HVM Xen xen/pvticketlock: allow interrupts to be enabled while blocking x86/ticketlock: add slowpath logic x86/pvticketlock: when paravirtualizing ticket locks, increment by 2 x86/pvticketlock: use callee-save for lock_spinning xen/pvticketlocks: add xen_nopvspin parameter to disable xen pv ticketlocks xen/pvticketlock: Xen implementation for PV ticket locks xen: defer spinlock setup until boot CPU setup x86/ticketlock: collapse a layer of functions x86/ticketlock: don't inline _spin_unlock when using paravirt spinlocks x86/spinlock: replace pv spinlocks with pv ticketlocks x86/cmpxchg: add a locked add() helper
2011-11-09[libata] ahci: Add ASMedia ASM1061 supportKeng-Yu Lin2-0/+5
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-11-09[libata] Issue SRST to Sil3726 PMPGwendal Grignou2-6/+13
Reenable sending SRST to devices connected behind a Sil3726 PMP. This allow staggered spinups and handles drives that spins up slowly. While the drives spin up, the PMP will not accept SRST. Most controller reissues the reset until the drive is ready, while some [Sil3124] returns an error. In ata_eh_error, wait 10s before reset the ATA port and try again. Signed-off-by: Gwendal Grignou <gwendal@google.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-11-09sata_sis.c: trivial spelling fixChris Dunlop1-1/+1
Trivial spelling fix. Signed-off-by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>