pandora-kernel.git
12 years ago[SCSI] hpsa: Disable ASPM
Matthew Garrett [Fri, 11 Nov 2011 16:14:23 +0000 (11:14 -0500)]
[SCSI] hpsa: Disable ASPM

The Windows driver .inf disables ASPM on hpsa devices. Do the same because the
selection of a non default ASPM policy can cause the device to hang.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: stable@kernel.org
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoMIPS: lantiq: use export.h in favour of module.h
John Crispin [Thu, 10 Nov 2011 20:33:07 +0000 (21:33 +0100)]
MIPS: lantiq: use export.h in favour of module.h

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>
12 years agoMAINTAINERS: The MIPS git tree has moved.
Ralf Baechle [Mon, 14 Nov 2011 12:58:16 +0000 (12:58 +0000)]
MAINTAINERS: The MIPS git tree has moved.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agox86: Call stop_machine_text_poke() on all CPUs
Rabin Vincent [Thu, 27 Oct 2011 07:54:32 +0000 (13:24 +0530)]
x86: Call stop_machine_text_poke() on all CPUs

It appears that stop_machine_text_poke() wants to be called on all CPUs,
like it's done from text_poke_smp().  Fix text_poke_smp_batch() to do
this.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Jason Baron <jbaron@redhat.com>
Link: http://lkml.kernel.org/r/1319702072-32676-1-git-send-email-rabin@rab.in
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years ago[S390] topology: fix topology on z10 machines
Heiko Carstens [Mon, 14 Nov 2011 10:19:08 +0000 (11:19 +0100)]
[S390] topology: fix topology on z10 machines

Make sure that all cpus in a book on a z10 appear as book siblings
and not as core siblings. This fixes some performance regressions that
appeared after the book scheduling domain got introduced.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years ago[S390] crypto: avoid MSA3 and MSA4 instructions in ESA mode
Jan Glauber [Mon, 14 Nov 2011 10:19:07 +0000 (11:19 +0100)]
[S390] crypto: avoid MSA3 and MSA4 instructions in ESA mode

MSA3 and MSA4 instructions are only available under CONFIG_64BIT.
Bail out before using any of these instructions if the kernel is
running in 31 bit mode.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years ago[S390] avoid STCKF if running in ESA mode
Jan Glauber [Mon, 14 Nov 2011 10:19:06 +0000 (11:19 +0100)]
[S390] avoid STCKF if running in ESA mode

In ESA mode STCKF is not defined even if the facility bit is enabled.
To prevent an illegal operation we must also check if we run a 64 bit kernel.
To make the check perform well add the STCKF bit to the machine flags.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years ago[S390] zfcpdump: Do not initialize zfcpdump in kdump mode
Michael Holzheu [Mon, 14 Nov 2011 10:19:05 +0000 (11:19 +0100)]
[S390] zfcpdump: Do not initialize zfcpdump in kdump mode

When the kernel is started in kdump mode, zfcpdump should not be
initialized because both dump methods can't be used at the same time.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years ago[S390] ap: Setup processing for messages in request queue.
Holger Dengler [Mon, 14 Nov 2011 10:19:04 +0000 (11:19 +0100)]
[S390] ap: Setup processing for messages in request queue.

Setup timer for processing messages in request queue, if sending an AP
message returns with reason code AP_RESPONSE_RESET_IN_PROGRESS.

Signed-off-by: Holger Dengler <hd@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years ago[S390] Kconfig: Select CONFIG_KEXEC for CONFIG_CRASH_DUMP
Michael Holzheu [Mon, 14 Nov 2011 10:19:03 +0000 (11:19 +0100)]
[S390] Kconfig: Select CONFIG_KEXEC for CONFIG_CRASH_DUMP

The kdump infrastructure is built on top of kexec. Therefore
CONFIG_KEXEC has to be enabled when CONFIG_CRASH_DUMP is selected.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years ago[S390] incorrect note program header
Martin Schwidefsky [Mon, 14 Nov 2011 10:19:02 +0000 (11:19 +0100)]
[S390] incorrect note program header

'readelf -n' on the s390 vmlinux file generates lots of warnings about
corrupt notes. The reason is that the 'NOTE' program header has incorrect
file and memory sizes. The problem is that the section following the
NOTES section do not switch to a different phdr and they get added to
the NOTE program section. Add a dummy entry to the linker script that
switches to the data phdr before the start of the RODATA section.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years ago[S390] pfault: ignore leftover completion interrupts
Heiko Carstens [Mon, 14 Nov 2011 10:19:01 +0000 (11:19 +0100)]
[S390] pfault: ignore leftover completion interrupts

Ignore completion interrupts if the initial interrupt hasn't been
received and the addressed task is not running. This case can only
happen if leftover (pending) completion interrupt gets delivered
which wasn't removed with the PFAULT CANCEL operation during cpu
hotplug.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years ago[S390] fix pgste update logic
Martin Schwidefsky [Mon, 14 Nov 2011 10:19:00 +0000 (11:19 +0100)]
[S390] fix pgste update logic

The pgste_update_all / pgste_update_young and pgste_set_pte need to
check if the pte entry contains a valid page address before the storage
key can be accessed. In addition pgste_set_pte needs to set the access
key and fetch protection bit of the new pte entry, not the old entry.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years ago[S390] wire up process_vm syscalls
Heiko Carstens [Mon, 14 Nov 2011 10:18:59 +0000 (11:18 +0100)]
[S390] wire up process_vm syscalls

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
12 years agovgaarb: a NULL bridge is acceptable for root devices.
Dave Airlie [Mon, 10 Oct 2011 08:29:18 +0000 (09:29 +0100)]
vgaarb: a NULL bridge is acceptable for root devices.

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>
12 years agoALSA: hda/realtek: remove redundant semicolon
Jesper Juhl [Sun, 13 Nov 2011 22:11:50 +0000 (23:11 +0100)]
ALSA: hda/realtek: remove redundant semicolon

Having just one semicolon after a break statement is enough.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agodrm: Remove utterly bogus preempt_disable() sections
Thomas Gleixner [Sat, 23 Jul 2011 10:45:07 +0000 (12:45 +0200)]
drm: Remove utterly bogus preempt_disable() sections

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>
12 years agoblackfin: Fixup export.h includes
Lars-Peter Clausen [Fri, 11 Nov 2011 10:06:38 +0000 (11:06 +0100)]
blackfin: Fixup export.h includes

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>
12 years agoBlackfin: add serial TX IRQ in individual platform resource
Sonic Zhang [Mon, 1 Aug 2011 09:53:21 +0000 (17:53 +0800)]
Blackfin: add serial TX IRQ in individual platform resource

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>
12 years agoMerge branch 'rmobile-fixes-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Mon, 14 Nov 2011 08:47:04 +0000 (06:47 -0200)]
Merge branch 'rmobile-fixes-for-linus' of git://github.com/pmundt/linux-sh

* '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

12 years agoMerge branch 'sh-fixes-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Mon, 14 Nov 2011 08:45:30 +0000 (06:45 -0200)]
Merge branch 'sh-fixes-for-linus' of git://github.com/pmundt/linux-sh

* '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

12 years agoMerge git://github.com/rustyrussell/linux
Linus Torvalds [Mon, 14 Nov 2011 06:00:01 +0000 (04:00 -0200)]
Merge git://github.com/rustyrussell/linux

* git://github.com/rustyrussell/linux:
  virtio-pci: fix use after free

12 years agosparc: sigutil: Include <linux/errno.h>
Ben Hutchings [Sun, 13 Nov 2011 07:20:04 +0000 (07:20 +0000)]
sparc: sigutil: Include <linux/errno.h>

This file introduced in 2.6.32.47 currently fails to compile:

arch/sparc/kernel/sigutil_64.c: In function 'save_fpu_state':
arch/sparc/kernel/sigutil_64.c:25: error: 'EFAULT' undeclared (first use in this function)

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovirtio-pci: fix use after free
Michael S. Tsirkin [Mon, 7 Nov 2011 16:37:05 +0000 (18:37 +0200)]
virtio-pci: fix use after free

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
12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sun, 13 Nov 2011 19:09:55 +0000 (17:09 -0200)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon/kms/combios: fix dynamic allocation of PM clock modes

12 years agoblock: Always check length of all iov entries in blk_rq_map_user_iov()
Ben Hutchings [Sun, 13 Nov 2011 18:58:09 +0000 (19:58 +0100)]
block: Always check length of all iov entries in blk_rq_map_user_iov()

Even after commit 5478755616ae2ef1ce144dded589b62b2a50d575
("block: check for proper length of iov entries earlier ...")
we still won't check for zero-length entries after an unaligned
entry.  Remove the break-statement, so all entries are checked.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression)
Rafael J. Wysocki [Sat, 12 Nov 2011 22:17:27 +0000 (23:17 +0100)]
ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression)

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>
12 years agodrm/radeon/kms/combios: fix dynamic allocation of PM clock modes
Alex Deucher [Sat, 12 Nov 2011 16:57:29 +0000 (11:57 -0500)]
drm/radeon/kms/combios: fix dynamic allocation of PM clock modes

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>
12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Sat, 12 Nov 2011 15:29:04 +0000 (13:29 -0200)]
Merge branch 'fixes' of git://git./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

12 years ago[CPUFREQ] db8500: fix build error due to undeclared i variable
Axel Lin [Fri, 4 Nov 2011 12:04:41 +0000 (20:04 +0800)]
[CPUFREQ] db8500: fix build error due to undeclared i variable

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>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Sat, 12 Nov 2011 02:04:51 +0000 (00:04 -0200)]
Merge branch 'for-linus' of git://git./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()
  ...

12 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sat, 12 Nov 2011 02:03:50 +0000 (00:03 -0200)]
Merge branch 'v4l_for_linus' of git://git./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

12 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Sat, 12 Nov 2011 02:01:51 +0000 (00:01 -0200)]
Merge branch 'merge' of git://git./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

12 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Sat, 12 Nov 2011 01:59:40 +0000 (23:59 -0200)]
Merge branch 'rc-fixes' of git://git./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.

12 years agobma023: Add SFI translation for this device
William Douglas [Thu, 10 Nov 2011 13:50:38 +0000 (13:50 +0000)]
bma023: Add SFI translation for this device

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>
12 years agovrtc: change its year offset from 1960 to 1972
Feng Tang [Thu, 10 Nov 2011 13:23:39 +0000 (13:23 +0000)]
vrtc: change its year offset from 1960 to 1972

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>
12 years agoce4100: fix a build error
Zhang Rui [Thu, 10 Nov 2011 13:21:10 +0000 (13:21 +0000)]
ce4100: fix a build error

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>
12 years agoMerge branch 'upstream-linus' of git://github.com/jgarzik/libata-dev
Linus Torvalds [Sat, 12 Nov 2011 01:55:01 +0000 (23:55 -0200)]
Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-dev

* '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

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sat, 12 Nov 2011 01:47:06 +0000 (23:47 -0200)]
Merge branch 'for-linus' of git://git./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()'

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Sat, 12 Nov 2011 01:45:42 +0000 (23:45 -0200)]
Merge branch 'for-linus' of git://git./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

12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sat, 12 Nov 2011 01:43:51 +0000 (23:43 -0200)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

* '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
  ...

12 years agoMerge git://github.com/herbertx/crypto
Linus Torvalds [Sat, 12 Nov 2011 01:40:02 +0000 (23:40 -0200)]
Merge git://github.com/herbertx/crypto

* git://github.com/herbertx/crypto:
  crypto: algapi - Fix build problem with NET disabled
  crypto: user - Fix rwsem leak in crypto_user

12 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Sat, 12 Nov 2011 01:37:17 +0000 (23:37 -0200)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* '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

12 years agoThe Windows driver .inf disables ASPM on all cciss devices. Do the same.
Matthew Garrett [Fri, 11 Nov 2011 21:05:54 +0000 (22:05 +0100)]
The Windows driver .inf disables ASPM on all cciss devices. Do the same.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: iss_storagedev@hp.com
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoSmack: smackfs cipso seq read repair
Casey Schaufler [Thu, 10 Nov 2011 23:02:22 +0000 (15:02 -0800)]
Smack: smackfs cipso seq read repair

Commit 272cd7a8c67dd40a31ecff76a503bbb84707f757 introduced
a change to the way rule lists are handled and reported in
the smackfs filesystem. One of the issues addressed had to
do with the termination of read requests on /smack/load.
This change introduced a error in /smack/cipso, which shares
some of the same list processing code.

This patch updates all the file access list handling in
smackfs to use the code introduced for /smack/load.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
12 years agoMerge branch 'picoxcell-fixes' of git://github.com/jamieiles/linux-2.6-ji into fixes
Olof Johansson [Fri, 11 Nov 2011 18:34:20 +0000 (10:34 -0800)]
Merge branch 'picoxcell-fixes' of git://github.com/jamieiles/linux-2.6-ji into fixes

12 years agoMerge branch 'imx-fixes-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into...
Olof Johansson [Fri, 11 Nov 2011 16:53:46 +0000 (08:53 -0800)]
Merge branch 'imx-fixes-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes

12 years agoarm/imx: fix imx6q mmc error when mounting rootfs
Shawn Guo [Thu, 10 Nov 2011 08:39:32 +0000 (16:39 +0800)]
arm/imx: fix imx6q mmc error when mounting rootfs

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>
12 years agoarm/imx: fix AUTO_ZRELADDR selection
Shawn Guo [Thu, 10 Nov 2011 08:39:31 +0000 (16:39 +0800)]
arm/imx: fix AUTO_ZRELADDR selection

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>
12 years agoarm/imx: fix the references to ARCH_MX3
Shawn Guo [Fri, 11 Nov 2011 07:37:14 +0000 (15:37 +0800)]
arm/imx: fix the references to ARCH_MX3

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>
12 years agoARM: mx51/53: set pwm clock parent to ipg_perclk
Richard Zhao [Tue, 8 Nov 2011 01:59:34 +0000 (09:59 +0800)]
ARM: mx51/53: set pwm clock parent to ipg_perclk

Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
12 years agobtrfs: rename the option to nospace_cache
David Sterba [Fri, 11 Nov 2011 15:14:57 +0000 (10:14 -0500)]
btrfs: rename the option to nospace_cache

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>
12 years agoMIPS: Fix build error due to missing inclusion of <linux/export.h>.
Ralf Baechle [Thu, 10 Nov 2011 14:15:57 +0000 (14:15 +0000)]
MIPS: Fix build error due to missing inclusion of <linux/export.h>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years ago[SCSI] aacraid: controller hangs if kernel uses non-default ASPM policy
Vasily Averin [Fri, 11 Nov 2011 09:42:16 +0000 (13:42 +0400)]
[SCSI] aacraid: controller hangs if kernel uses non-default ASPM policy

Aacraid controller can hang on some nodes if kernel uses non-default
(powersave) ASPM policy.  Controller hangs shortly after successful load and
hardware detection. Scsi error handler detects this hang and tries to restart
hardware but it does not help.

Initially it was noticed on RHEL6-based openVZ kernel after backporting
aacraid driver from mainline (RHEL6 kernel with original driver works well)
http://bugzilla.openvz.org/show_bug.cgi?id=2043

This issue happens because default ASPM policy was changed in Red Hat
kernels. Therefore guys from Red Hat have noticed this problem long time ago:
on Fedora 12
 https://bugzilla.redhat.com/show_bug.cgi?id=540478
on Fedora 14
 https://bugzilla.redhat.com/show_bug.cgi?id=679385

In RHEL6 kernel this issue was fixed, ASPM was disabled in aacraid driver. In
kernel changelog I've found that seems it was done by Matthew Garrett: -
[scsi] aacraid: Disable ASPM by default (Matthew Garrett) [599735]

However seems this patch was not submitted to mainline. I've reproduced this
issue on vanilla 3.1.0 kernel booted with "pcie_aspm.policy=powersave" option,
So I believe it makes sense to do it now.

Signed-off-by: Vasily Averin <vvs@sw.ru>
[mjg: Checking the Windows drivers indicates that they disable ASPM under all
circumstances, so:]
Acked-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Achim Leubner <Achim_Leubner@pmc-sierra.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agodrm/radeon/kms/pm: switch to dynamically allocating clock mode array
Alex Deucher [Fri, 4 Nov 2011 14:09:43 +0000 (10:09 -0400)]
drm/radeon/kms/pm: switch to dynamically allocating clock mode array

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>
12 years agodrm/radeon/kms: optimize r600_pm_profile_init
Alex Deucher [Fri, 4 Nov 2011 14:09:42 +0000 (10:09 -0400)]
drm/radeon/kms: optimize r600_pm_profile_init

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>
12 years agodrm/radeon/kms/pm: add a proper pm profile init function for fusion
Alex Deucher [Fri, 4 Nov 2011 14:09:41 +0000 (10:09 -0400)]
drm/radeon/kms/pm: add a proper pm profile init function for fusion

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>
12 years agodrm/radeon/kms: remove extraneous calls to radeon_pm_compute_clocks()
Alex Deucher [Fri, 4 Nov 2011 14:09:40 +0000 (10:09 -0400)]
drm/radeon/kms: remove extraneous calls to radeon_pm_compute_clocks()

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>
12 years agoBtrfs: handle bio_add_page failure gracefully in scrub
Arne Jansen [Fri, 11 Nov 2011 13:17:10 +0000 (08:17 -0500)]
Btrfs: handle bio_add_page failure gracefully in scrub

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>
12 years agobacking-dev: ensure wakeup_timer is deleted
Rabin Vincent [Fri, 11 Nov 2011 12:29:04 +0000 (13:29 +0100)]
backing-dev: ensure wakeup_timer is deleted

bdi_prune_sb() in bdi_unregister() attempts to removes the bdi links
from all super_blocks and then del_timer_sync() the writeback timer.

However, this can race with __mark_inode_dirty(), leading to
bdi_wakeup_thread_delayed() rearming the writeback timer on the bdi
we're unregistering, after we've called del_timer_sync().

This can end up with the bdi being freed with an active timer inside it,
as in the case of the following dump after the removal of an SD card.

Fix this by redoing the del_timer_sync() in bdi_destory().

 ------------[ cut here ]------------
 WARNING: at /home/rabin/kernel/arm/lib/debugobjects.c:262 debug_print_object+0x9c/0xc8()
 ODEBUG: free active (active state 0) object type: timer_list hint: wakeup_timer_fn+0x0/0x180
 Modules linked in:
 Backtrace:
 [<c00109dc>] (dump_backtrace+0x0/0x110) from [<c0236e4c>] (dump_stack+0x18/0x1c)
  r6:c02bc638 r5:00000106 r4:c79f5d18 r3:00000000
 [<c0236e34>] (dump_stack+0x0/0x1c) from [<c0025e6c>] (warn_slowpath_common+0x54/0x6c)
 [<c0025e18>] (warn_slowpath_common+0x0/0x6c) from [<c0025f28>] (warn_slowpath_fmt+0x38/0x40)
  r8:20000013 r7:c780c6f0 r6:c031613c r5:c780c6f0 r4:c02b1b29
 r3:00000009
 [<c0025ef0>] (warn_slowpath_fmt+0x0/0x40) from [<c015eb4c>] (debug_print_object+0x9c/0xc8)
  r3:c02b1b29 r2:c02bc662
 [<c015eab0>] (debug_print_object+0x0/0xc8) from [<c015f574>] (debug_check_no_obj_freed+0xac/0x1dc)
  r6:c7964000 r5:00000001 r4:c7964000
 [<c015f4c8>] (debug_check_no_obj_freed+0x0/0x1dc) from [<c00a9e38>] (kmem_cache_free+0x88/0x1f8)
 [<c00a9db0>] (kmem_cache_free+0x0/0x1f8) from [<c014286c>] (blk_release_queue+0x70/0x78)
 [<c01427fc>] (blk_release_queue+0x0/0x78) from [<c015290c>] (kobject_release+0x70/0x84)
  r5:c79641f0 r4:c796420c
 [<c015289c>] (kobject_release+0x0/0x84) from [<c0153ce4>] (kref_put+0x68/0x80)
  r7:00000083 r6:c74083d0 r5:c015289c r4:c796420c
 [<c0153c7c>] (kref_put+0x0/0x80) from [<c01527d0>] (kobject_put+0x48/0x5c)
  r5:c79643b4 r4:c79641f0
 [<c0152788>] (kobject_put+0x0/0x5c) from [<c013ddd8>] (blk_cleanup_queue+0x68/0x74)
  r4:c7964000
 [<c013dd70>] (blk_cleanup_queue+0x0/0x74) from [<c01a6370>] (mmc_blk_put+0x78/0xe8)
  r5:00000000 r4:c794c400
 [<c01a62f8>] (mmc_blk_put+0x0/0xe8) from [<c01a64b4>] (mmc_blk_release+0x24/0x38)
  r5:c794c400 r4:c0322824
 [<c01a6490>] (mmc_blk_release+0x0/0x38) from [<c00de11c>] (__blkdev_put+0xe8/0x170)
  r5:c78d5e00 r4:c74083c0
 [<c00de034>] (__blkdev_put+0x0/0x170) from [<c00de2c0>] (blkdev_put+0x11c/0x12c)
  r8:c79f5f70 r7:00000001 r6:c74083d0 r5:00000083 r4:c74083c0
 r3:00000000
 [<c00de1a4>] (blkdev_put+0x0/0x12c) from [<c00b0724>] (kill_block_super+0x60/0x6c)
  r7:c7942300 r6:c79f4000 r5:00000083 r4:c74083c0
 [<c00b06c4>] (kill_block_super+0x0/0x6c) from [<c00b0a94>] (deactivate_locked_super+0x44/0x70)
  r6:c79f4000 r5:c031af64 r4:c794dc00 r3:c00b06c4
 [<c00b0a50>] (deactivate_locked_super+0x0/0x70) from [<c00b1358>] (deactivate_super+0x6c/0x70)
  r5:c794dc00 r4:c794dc00
 [<c00b12ec>] (deactivate_super+0x0/0x70) from [<c00c88b0>] (mntput_no_expire+0x188/0x194)
  r5:c794dc00 r4:c7942300
 [<c00c8728>] (mntput_no_expire+0x0/0x194) from [<c00c95e0>] (sys_umount+0x2e4/0x310)
  r6:c7942300 r5:00000000 r4:00000000 r3:00000000
 [<c00c92fc>] (sys_umount+0x0/0x310) from [<c000d940>] (ret_fast_syscall+0x0/0x30)
 ---[ end trace e5c83c92ada51c76 ]---

Cc: stable@kernel.org
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agodrm/exynos: added padding to be 64-bit align.
Inki Dae [Fri, 4 Nov 2011 12:09:50 +0000 (21:09 +0900)]
drm/exynos: added padding to be 64-bit align.

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>
12 years agodrm: fix kconfig unmet dependency warning
Randy Dunlap [Mon, 31 Oct 2011 19:51:30 +0000 (12:51 -0700)]
drm: fix kconfig unmet dependency warning

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>
12 years agoMerge branch 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2...
Dave Airlie [Fri, 11 Nov 2011 11:17:43 +0000 (11:17 +0000)]
Merge branch 'drm-nouveau-fixes' of 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

12 years agodrm: add some comments to drm_wait_vblank and drm_queue_vblank_event
Ilija Hadzic [Mon, 31 Oct 2011 17:11:57 +0000 (13:11 -0400)]
drm: add some comments to drm_wait_vblank and drm_queue_vblank_event

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>
12 years agodrm/radeon/benchmark: signedness bug in radeon_benchmark_move()
Dan Carpenter [Sat, 29 Oct 2011 07:21:28 +0000 (10:21 +0300)]
drm/radeon/benchmark: signedness bug in radeon_benchmark_move()

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>
12 years agodrm: do not sleep on vblank while holding a mutex
Ilija Hadzic [Mon, 31 Oct 2011 21:46:18 +0000 (17:46 -0400)]
drm: do not sleep on vblank while holding a mutex

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>
12 years agoMAINTAINERS: exynos: Add EXYNOS DRM maintainer entry
Kyungmin Park [Wed, 2 Nov 2011 02:33:16 +0000 (11:33 +0900)]
MAINTAINERS: exynos: Add EXYNOS DRM maintainer entry

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>
12 years agodrm: try to restore previous CRTC config if mode set fails
Jesse Barnes [Mon, 7 Nov 2011 18:39:57 +0000 (10:39 -0800)]
drm: try to restore previous CRTC config if mode set fails

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>
12 years agodrm/radeon/kms: make an aux failure debug only
Alex Deucher [Tue, 8 Nov 2011 15:09:58 +0000 (10:09 -0500)]
drm/radeon/kms: make an aux failure debug only

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>
12 years agodrm: drop select of SLOW_WORK
Paul Bolle [Wed, 9 Nov 2011 00:16:50 +0000 (01:16 +0100)]
drm: drop select of SLOW_WORK

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>
12 years agodrm: serialize access to list of debugfs files
Marcin Slusarz [Wed, 9 Nov 2011 21:20:35 +0000 (22:20 +0100)]
drm: serialize access to list of debugfs files

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>
12 years agodrm/radeon/kms: fix use of vram scratch page on evergreen/ni
Alex Deucher [Thu, 10 Nov 2011 13:59:39 +0000 (08:59 -0500)]
drm/radeon/kms: fix use of vram scratch page on evergreen/ni

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>
12 years agodrm/radeon: Make sure CS mutex is held across GPU reset.
Michel Dänzer [Thu, 10 Nov 2011 17:57:26 +0000 (18:57 +0100)]
drm/radeon: Make sure CS mutex is held across GPU reset.

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>
12 years agodrm: Ensure string is null terminated.
Vinson Lee [Thu, 10 Nov 2011 19:55:40 +0000 (11:55 -0800)]
drm: Ensure string is null terminated.

Fixes Coverity buffer not null terminated defect.

Signed-off-by: Vinson Lee <vlee@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Only allow 64x64 cursors
Jakob Bornecrantz [Wed, 9 Nov 2011 09:25:28 +0000 (10:25 +0100)]
vmwgfx: Only allow 64x64 cursors

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>
12 years agovmwgfx: Initialize clip rect loop correctly in surface dirty
Jakob Bornecrantz [Wed, 9 Nov 2011 09:25:27 +0000 (10:25 +0100)]
vmwgfx: Initialize clip rect loop correctly in surface dirty

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: Close screen object system
Jakob Bornecrantz [Wed, 9 Nov 2011 09:25:26 +0000 (10:25 +0100)]
vmwgfx: Close screen object system

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoARM: mach-shmobile: cpuidle single/global and last_state fixes
Magnus Damm [Fri, 11 Nov 2011 05:01:30 +0000 (14:01 +0900)]
ARM: mach-shmobile: cpuidle single/global and last_state fixes

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>
12 years agoARM: mach-shmobile: move helper macro PORTCR to sh_pfc.h
Kuninori Morimoto [Fri, 11 Nov 2011 02:45:43 +0000 (18:45 -0800)]
ARM: mach-shmobile: move helper macro PORTCR to sh_pfc.h

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: move helper macro PORT_xx to sh_pfc.h
Kuninori Morimoto [Fri, 11 Nov 2011 02:45:33 +0000 (18:45 -0800)]
ARM: mach-shmobile: move helper macro PORT_xx to sh_pfc.h

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>
12 years agoARM: mach-shmobile: move helper macro PORT_DATA_xx to sh_pfc.h
Kuninori Morimoto [Fri, 11 Nov 2011 02:45:23 +0000 (18:45 -0800)]
ARM: mach-shmobile: move helper macro PORT_DATA_xx to sh_pfc.h

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>
12 years agoARM: mach-shmobile: ap4evb: remove white space from end of line
Kuninori Morimoto [Fri, 11 Nov 2011 02:45:12 +0000 (18:45 -0800)]
ARM: mach-shmobile: ap4evb: remove white space from end of line

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: clock-sh7372: remove un-necessary index
Kuninori Morimoto [Fri, 11 Nov 2011 02:45:02 +0000 (18:45 -0800)]
ARM: mach-shmobile: clock-sh7372: remove un-necessary index

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>
12 years agoARM: mach-shmobile: kota2: add comment out separator
Kuninori Morimoto [Fri, 11 Nov 2011 02:44:43 +0000 (18:44 -0800)]
ARM: mach-shmobile: kota2: add comment out separator

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: sh73a0: add MMC data pin pull-up
Kuninori Morimoto [Fri, 11 Nov 2011 02:44:24 +0000 (18:44 -0800)]
ARM: mach-shmobile: sh73a0: add MMC data pin pull-up

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>
12 years agomailmap: Fix up some renesas attributions
Kuninori Morimoto [Fri, 11 Nov 2011 02:43:16 +0000 (18:43 -0800)]
mailmap: Fix up some renesas attributions

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>
12 years agoMerge branches 'sh/pm-runtime' and 'common/clkfwk' into sh-fixes-for-linus
Paul Mundt [Fri, 11 Nov 2011 07:16:25 +0000 (16:16 +0900)]
Merge branches 'sh/pm-runtime' and 'common/clkfwk' into sh-fixes-for-linus

12 years agosh: clkfwk: Kill off remaining debugfs cruft.
Paul Mundt [Fri, 11 Nov 2011 07:11:41 +0000 (16:11 +0900)]
sh: clkfwk: Kill off remaining debugfs cruft.

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>
12 years agoALSA: hda - pwr_nids cleanup for IDT codecs
Charles Chin [Fri, 11 Nov 2011 07:05:28 +0000 (08:05 +0100)]
ALSA: hda - pwr_nids cleanup for IDT codecs

Clean up and fix pwr_nids for 92HD71 / 73 / 83 family codecs; remove
pwr_mapping which was incorrect.

The original pwr_nids support of 92HD83xxx was incorrect and never
actually worked before.  Now we should have things working correctly
without having to hack by DID anymore.

It is also not necessary to explicitly turn on all the pins near the
beginning of patch_stac92hd83xxx() now, the pins will go though
initialization properly.

Tested on 92HD66 / 71 / 73 / 75 / 83 / 89 / 91 demo boards.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agodrivers: sh: Kill off dead pathname for runtime PM stub.
Paul Mundt [Fri, 11 Nov 2011 06:58:50 +0000 (15:58 +0900)]
drivers: sh: Kill off dead pathname for runtime PM stub.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agodrivers: sh: Generalize runtime PM platform stub.
Paul Mundt [Fri, 11 Nov 2011 06:41:50 +0000 (15:41 +0900)]
drivers: sh: Generalize runtime PM platform stub.

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>
12 years agosh: Wire up process_vm syscalls.
Paul Mundt [Mon, 7 Nov 2011 05:40:45 +0000 (14:40 +0900)]
sh: Wire up process_vm syscalls.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoBtrfs: fix deadlock caused by the race between relocation
Miao Xie [Fri, 11 Nov 2011 01:45:05 +0000 (20:45 -0500)]
Btrfs: fix deadlock caused by the race between relocation

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>
12 years agoBtrfs: only map pages if we know we need them when reading the space cache
Josef Bacik [Fri, 11 Nov 2011 01:45:05 +0000 (20:45 -0500)]
Btrfs: only map pages if we know we need them when reading the space cache

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>
12 years agoBtrfs: fix orphan backref nodes
Miao Xie [Fri, 11 Nov 2011 01:45:05 +0000 (20:45 -0500)]
Btrfs: fix orphan backref nodes

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>
12 years agoBtrfs: Abstract similar code for btrfs_block_rsv_add{, _noflush}
Miao Xie [Fri, 11 Nov 2011 01:45:05 +0000 (20:45 -0500)]
Btrfs: Abstract similar code for btrfs_block_rsv_add{, _noflush}

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>
12 years agoBtrfs: fix unreleased path in btrfs_orphan_cleanup()
Miao Xie [Fri, 11 Nov 2011 01:45:05 +0000 (20:45 -0500)]
Btrfs: fix unreleased path in btrfs_orphan_cleanup()

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>
12 years agoBtrfs: fix no reserved space for writing out inode cache
Miao Xie [Fri, 11 Nov 2011 01:45:04 +0000 (20:45 -0500)]
Btrfs: fix no reserved space for writing out inode cache

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>
12 years agoBtrfs: fix nocow when deleting the item
Miao Xie [Fri, 11 Nov 2011 01:45:04 +0000 (20:45 -0500)]
Btrfs: fix nocow when deleting the item

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>
12 years agoMerge branch 'mount-fixes' of git://github.com/idryomov/btrfs-unstable into integration
Chris Mason [Fri, 11 Nov 2011 01:42:53 +0000 (20:42 -0500)]
Merge branch 'mount-fixes' of git://github.com/idryomov/btrfs-unstable into integration