sfrench/cifs-2.6.git
14 years agomemcg: fix wrong pointer initialization at page migration when memcg is disabled.
KAMEZAWA Hiroyuki [Wed, 11 Nov 2009 22:26:26 +0000 (14:26 -0800)]
memcg: fix wrong pointer initialization at page migration when memcg is disabled.

Lee Schermerhorn reported that he saw bad pointer dereference in
mem_cgroup_end_migration() when he disabled memcg by boot option.

memcg's page migration logic works as

mem_cgroup_prepare_migration(page, &ptr);
do page migration
mem_cgroup_end_migration(page, ptr);

Now, ptr is not initialized in prepare_migration when memcg is disabled
by boot option. This causes panic in end_migration. This patch fixes it.

Reported-by: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosavagefb: fix blanking mode on CRT display
Krzysztof Helt [Wed, 11 Nov 2009 22:26:25 +0000 (14:26 -0800)]
savagefb: fix blanking mode on CRT display

Fix wrong bit mask for blanking register.  Due to the error a CRT monitor
blanks off due to wrong frequency (out of range) instead of PM signal
(vertical and horizontal frequencies cut off).

Just compare the mask with bits set in the switch(blank) clause below the
changed line.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofb: remove fb_save_state() and fb_restore_state operations
Krzysztof Helt [Wed, 11 Nov 2009 22:26:22 +0000 (14:26 -0800)]
fb: remove fb_save_state() and fb_restore_state operations

Remove fb_save_state() and fb_restore_state operations from frame buffer layer.
They are used only in two drivers:
1. savagefb  - and cause bug #11248
2. uvesafb

Usage of these operations is misunderstood in both drivers so kill these
operations, fix the bug #11248 and avoid confusion in the future.

Tested on Savage 3D/MV card and the patch fixes the bug #11248.

The frame buffer layer uses these funtions during switch between graphics
and text mode of the console, but these drivers saves state before
switching of the frame buffer (in the fb_open) and after releasing it (in
the fb_release).  This defeats the purpose of these operations.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11248

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reported-by: Jochen Hein <jochen@jochen.org>
Tested-by: Jochen Hein <jochen@jochen.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Januszewski <spock@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agopage allocator: Do not allow interrupts to use ALLOC_HARDER
Mel Gorman [Wed, 11 Nov 2009 22:26:17 +0000 (14:26 -0800)]
page allocator: Do not allow interrupts to use ALLOC_HARDER

Commit 341ce06f69abfafa31b9468410a13dbd60e2b237 ("page allocator:
calculate the alloc_flags for allocation only once") altered watermark
logic slightly by allowing rt_tasks that are handling an interrupt to set
ALLOC_HARDER.  This patch brings the watermark logic more in line with
2.6.30.

This change results in a reduction of the number high-order GFP_ATOMIC
allocation failures reported.  See
http://www.gossamer-threads.com/lists/linux/kernel/1144153

[rientjes@google.com: Spotted the problem]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agopage allocator: always wake kswapd when restarting an allocation attempt after direct...
Mel Gorman [Wed, 11 Nov 2009 22:26:14 +0000 (14:26 -0800)]
page allocator: always wake kswapd when restarting an allocation attempt after direct reclaim failed

If a direct reclaim makes no forward progress, it considers whether it
should go OOM or not.  Whether OOM is triggered or not, it may retry the
allocation afterwards.  In times past, this would always wake kswapd as
well but currently, kswapd is not woken up after direct reclaim fails.
For order-0 allocations, this makes little difference but if there is a
heavy mix of higher-order allocations that direct reclaim is failing for,
it might mean that kswapd is not rewoken for higher orders as much as it
did previously.

This patch wakes up kswapd when an allocation is being retried after a
direct reclaim failure.  It would be expected that kswapd is already
awake, but this has the effect of telling kswapd to reclaim at the higher
order as well.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMAINTAINERS: openipmi list is moderated
Randy Dunlap [Wed, 11 Nov 2009 22:26:13 +0000 (14:26 -0800)]
MAINTAINERS: openipmi list is moderated

openipmi list is moderated.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoget_maintainer: fix usage comment
Roel Kluin [Wed, 11 Nov 2009 22:26:13 +0000 (14:26 -0800)]
get_maintainer: fix usage comment

With the `s' it just won't work.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMAINTAINERS: VMWARE VMXNET3 - Quote name with comma and period, use tabs
Joe Perches [Wed, 11 Nov 2009 22:26:12 +0000 (14:26 -0800)]
MAINTAINERS: VMWARE VMXNET3 - Quote name with comma and period, use tabs

Names with periods or commas need to be quoted
Use tab not spaces

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMAINTAINERS: SERVER ENGINES 10Gbps iSCSI - Use single line M:
Joe Perches [Wed, 11 Nov 2009 22:26:11 +0000 (14:26 -0800)]
MAINTAINERS: SERVER ENGINES 10Gbps iSCSI - Use single line M:

Integrate P:/M: lines to single M:
Use tabs not spaces

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMAINTAINERS: BROCADE BFA - Use single line M: and tabs
Joe Perches [Wed, 11 Nov 2009 22:26:10 +0000 (14:26 -0800)]
MAINTAINERS: BROCADE BFA - Use single line M: and tabs

Integrate P:/M: to single M:
Use tab for spacing

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jing Huang <huangj@brocade.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMAINTAINERS: ASUS ACPI EXTRAS - remove F:arch/x86/kernel/acpi/boot.c
Joe Perches [Wed, 11 Nov 2009 22:26:09 +0000 (14:26 -0800)]
MAINTAINERS: ASUS ACPI EXTRAS - remove F:arch/x86/kernel/acpi/boot.c

Oops.  How did that get there?
(Don't look, it's my original pattern commit...)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofs/jbd: Export log_start_commit to fix ext3 build.
Stefan Schmidt [Thu, 12 Nov 2009 08:53:50 +0000 (09:53 +0100)]
fs/jbd: Export log_start_commit to fix ext3 build.

This fixes:
ERROR: "log_start_commit" [fs/ext3/ext3.ko] undefined!

Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
14 years agoALSA: hda: Use model=mb5 for MacBookPro 5,2
Daniel T Chen [Wed, 11 Nov 2009 19:32:10 +0000 (14:32 -0500)]
ALSA: hda: Use model=mb5 for MacBookPro 5,2

BugLink: https://bugs.launchpad.net/bugs/462098
Until we can look closer at the verbs, let's use ALC885_MB5 for
codec SSID 0x106b4600 to enable playback and capture for MacBookPro
5,2s.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agointel-iommu: Support PCIe hot-plug
Fenghua Yu [Wed, 11 Nov 2009 15:23:06 +0000 (07:23 -0800)]
intel-iommu: Support PCIe hot-plug

To support PCIe hot plug in IOMMU, we register a notifier to respond to device
change action.

When the notifier gets BUS_NOTIFY_UNBOUND_DRIVER, it removes the device
from its DMAR domain.

A hot added device will be added into an IOMMU domain when it first does IOMMU
op. So there is no need to add more code for hot add.

Without the patch, after a hot-remove, a hot-added device on the same
slot will not work.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Tested-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agointel-iommu: Obey coherent_dma_mask for alloc_coherent on passthrough
Alex Williamson [Wed, 4 Nov 2009 22:59:34 +0000 (15:59 -0700)]
intel-iommu: Obey coherent_dma_mask for alloc_coherent on passthrough

The model for IOMMU passthrough is that decent devices that can cope
with DMA to all of memory get passthrough; crappy devices with a limited
dma_mask don't -- they get to use the IOMMU anyway.

This is done on the basis that IOMMU passthrough is usually wanted for
performance reasons, and it's only the decent PCI devices that you
really care about performance for, while the crappy 32-bit ones like
your USB controller can just use the IOMMU and you won't really care.

Unfortunately, the check for this was only looking at dev->dma_mask, not
at dev->coherent_dma_mask. And some devices have a 32-bit
coherent_dma_mask even though they have a full 64-bit dma_mask.

Even more unfortunately, fixing that simple oversight would upset
certain broken HP devices. Not only do they have a 32-bit
coherent_dma_mask, but they also have a tendency to do stray DMA to
unmapped addresses. And then they die when they take the DMA fault they
so richly deserve.

So if we do the 'correct' fix, it'll mean that affected users have to
disable IOMMU support completely on "a large percentage of servers from
a major vendor."

Personally, I have little sympathy -- given that this is the _same_
'major vendor' who is shipping machines which claim to have IOMMU
support but have obviously never _once_ booted a VT-d capable OS to do
any form of QA. But strictly speaking, it _would_ be a regression even
though it only ever worked by fluke.

For 2.6.33, we'll come up with a quirk which gives swiotlb support
for this particular device, and other devices with an inadequate
coherent_dma_mask will just get normal IOMMU mapping.

The simplest fix for 2.6.32, though, is just to jump through some hoops
to try to allocate coherent DMA memory for such devices in a place that
they can reach. We'd use dma_generic_alloc_coherent() for this if it
existed on IA64.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agomd: factor out updating of 'recovery_offset'.
NeilBrown [Thu, 12 Nov 2009 01:08:04 +0000 (12:08 +1100)]
md: factor out updating of 'recovery_offset'.

Each device has its own 'recovery_offset' showing how far
recovery has progressed on the device.
As the only real significance of this is that fact that it can
be stored in the metadata and recovered at restart, and as
only 1.x metadata can do this, we were only updating
'recovery_offset' to 'curr_resync_completed' when updating
v1.x metadata.
But this is wrong, and we will shortly make limited use of this
field in v0.90 metadata.

So move the update into common code.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoomap3: Decrease cpufreq transition latency
Mike Turquette [Wed, 11 Nov 2009 19:00:38 +0000 (11:00 -0800)]
omap3: Decrease cpufreq transition latency

Adjust OMAP3 frequency transition latency from 10,000,000uS to a more
reasonable 300,000uS.  This causes ondemand and conservative governors to
sample CPU load more often resulting in more responsive behavior.

Tested on Android 2.6.29; using this value and conservative governor, CORE
power consumption on Zoom2 was comparable to the old and unresponsive
10,000,000uS value while UI responsiveness was greatly improved.

Signed-off-by: Mike Turquette <mturquette@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Wed, 11 Nov 2009 21:38:59 +0000 (13:38 -0800)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: fix panic when trying to destroy a newly allocated
  Btrfs: allow more metadata chunk preallocation
  Btrfs: fallback on uncompressed io if compressed io fails
  Btrfs: find ideal block group for caching
  Btrfs: avoid null deref in unpin_extent_cache()
  Btrfs: skip btrfs_release_path in btrfs_update_root and btrfs_del_root
  Btrfs: fix some metadata enospc issues
  Btrfs: fix how we set max_size for free space clusters
  Btrfs: cleanup transaction starting and fix journal_info usage
  Btrfs: fix data allocation hint start

14 years agobtusb bluetooth driver: wait for 'waker' work too before closing
Linus Torvalds [Wed, 11 Nov 2009 21:32:29 +0000 (13:32 -0800)]
btusb bluetooth driver: wait for 'waker' work too before closing

Rafael debugged a resume-time hang (with oopses in workqueue handling)
on his laptop that was due to the 'waker' workqueue entry being
disconnected and then released without the workqueue entry having been
synchronized.

Several people were involved, with Oleg Nesterov doing a debugging patch
showing what workqueue entry was corrupt etc.

This was a regression introduced by commit 7bee549e19 ("Bluetooth: Add
USB autosuspend support to btusb driver") as Rafael points out (not
actually bisected, but it became clear once the bug was found).

Tested-and-reported-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Oliver Neukum <oliver@neukum.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoBtrfs: fix panic when trying to destroy a newly allocated
Josef Bacik [Wed, 11 Nov 2009 20:53:34 +0000 (15:53 -0500)]
Btrfs: fix panic when trying to destroy a newly allocated

There is a problem where iget5_locked will look for an inode, not find it, and
then subsequently try to allocate it.  Another CPU will have raced in and
allocated the inode instead, so when iget5_locked gets the inode spin lock again
and does a search, it finds the new inode.  So it goes ahead and calls
destroy_inode on the inode it just allocated.  The problem is we don't set
BTRFS_I(inode)->root until the new inode is completely initialized.  This patch
makes us set root to NULL when alloc'ing a new inode, so when we get to
btrfs_destroy_inode and we see that root is NULL we can just free up the memory
and continue on.  This fixes the panic

http://www.kerneloops.org/submitresult.php?number=812690

Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Wed, 11 Nov 2009 19:52:22 +0000 (11:52 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-fs-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
  JBD/JBD2: free j_wbuf if journal init fails.
  ext3: Wait for proper transaction commit on fsync
  ext3: retry failed direct IO allocations

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Wed, 11 Nov 2009 19:35:04 +0000 (11:35 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - possible read past array alc88[02]_parse_auto_config()
  sound: rawmidi: fix MIDI device O_APPEND error handling
  sound: rawmidi: fix checking of O_APPEND when opening MIDI device
  sound: rawmidi: fix double init when opening MIDI device with O_APPEND
  ALSA: hda - Avoid quirk for HP dc5750
  ALSA: hda - Tweak OLPC XO-1.5 microphone bias
  ALSA: hda: Use model=auto quirk for Sony VAIO VGN-FW170J using ALC262

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Wed, 11 Nov 2009 19:34:14 +0000 (11:34 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  x86/PCI: Adjust GFP mask handling for coherent allocations
  PCI ASPM: fix oops on root port removal

14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Wed, 11 Nov 2009 19:33:08 +0000 (11:33 -0800)]
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: pasemi_defconfig update
  powerpc: 2.6.32 update of defconfigs for embedded 6xx/7xxx, 8xx, 8{3,5,6}xxx
  powerpc/8xxx: enable IPsec ESP by default on mpc83xx/mpc85xx
  powerpc/83xx: Fix u-boot partion size for MPC8377E-WLAN boards
  powerpc/85xx: Fix USB GPIOs for MPC8569E-MDS boards
  powerpc/82xx: kmalloc failure ignored in ep8248e_mdio_probe()
  powerpc/85xx: sbc8548 - fixup of PCI-e related DTS fields

14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Wed, 11 Nov 2009 19:32:42 +0000 (11:32 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: Use a definition for the userspace cmpxchg emulation syscall
  [ARM] Fix test for unimplemented ARM syscalls
  ARM: 5784/1: fix early boot machine ID mismatch error display
  [ARM] orion5x: update defconfig
  [ARM] Kirkwood: update defconfig
  [ARM] Kirkwood: clarify PCIe MEM bus/physical address distinction
  [ARM] kirkwood: fix PCI I/O port assignment
  [ARM] kirkwood: fix section mismatch
  [ARM] OpenRD base: Initialize PCI express and i2c
  [ARM] properly report mv78100 stepping A1
  ARM: 5780/1: KS8695: Fix macro definition bug in regs-switch.c
  ARM: 5779/1: ep93xx/micro9.c: fix implicit declaration of function __raw_readl and IOMEM
  RealView: Add sparsemem support for the RealView PBX platform
  RealView: Remove duplicated #define REALVIEW_SYS_FLAGS* statements
  RealView: Add default memory configuration
  Check whether the SCU was already initialised
  ARMv7: Check whether the SMP/nAMP mode was already enabled
  [ARM] pxa: fix resume failure by saving/restoring IPRx registers
  [ARM] pxa/palm: fix incorrect initialization of Palm Tungsten C keyboard
  [ARM] pxa/zaurus: fix NAND flash OOB layout for Borzoi

14 years agoMerge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Wed, 11 Nov 2009 19:32:04 +0000 (11:32 -0800)]
Merge branch 'drm-linus' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (52 commits)
  drm/kms: Init the CRTC info fields for modes forced from the command line.
  drm/radeon/r600: CS parser updates
  drm/radeon/kms: add debugfs for power management for AtomBIOS devices
  drm/radeon/kms: initial mode validation support
  drm/radeon/kms/atom/dce3: call transmitter init on mode set
  drm/radeon/kms: store detailed connector info
  drm/radeon/kms/atom/dce3: fix up usPixelClock calculation for Transmitter tables
  drm/radeon/kms/r600: fix rs880 support v2
  drm/radeon/kms/r700: fix some typos in chip init
  drm/radeon/kms: remove some misleading debugging output
  drm/radeon/kms: stop putting VRAM at 0 in MC space on r600s.
  drm/radeon/kms: disable D1VGA and D2VGA if enabled
  drm/radeon/kms: Don't RMW CP_RB_CNTL
  drm/radeon/kms: fix coherency issues on AGP cards.
  drm/radeon/kms: fix rc410 suspend/resume.
  drm/radeon/kms: add quirk for hp dc5750
  drm/radeon/kms/atom: fix potential oops in spread spectrum code
  drm/kms: typo fix
  drm/radeon/kms/atom: Make card_info per device
  drm/radeon/kms/atom: Fix DVO support
  ...

14 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 11 Nov 2009 19:30:15 +0000 (11:30 -0800)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  highmem: Fix debug_kmap_atomic() to also handle KM_IRQ_PTE, KM_NMI, and KM_NMI_PTE
  highmem: Fix race in debug_kmap_atomic() which could cause warn_count to underflow
  rcu: Fix long-grace-period race between forcing and initialization
  uids: Prevent tear down race

14 years agoMerge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 11 Nov 2009 19:29:58 +0000 (11:29 -0800)]
Merge branch 'irq-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: try_one_irq() must be called with irq disabled

14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 11 Nov 2009 19:29:34 +0000 (11:29 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf tools: Fix permission checks
  perf_events: Fix some typo in the perf events config description

14 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 11 Nov 2009 19:29:24 +0000 (11:29 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: Use root_task_group_empty only with FAIR_GROUP_SCHED
  sched: Fix kernel-doc function parameter name

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 11 Nov 2009 19:29:10 +0000 (11:29 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, amd-ucode: Check UCODE_MAGIC before loading the container file
  x86: Fix error return sequence in __ioremap_caller()
  x86: Add Phoenix/MSC BIOSes to lowmem corruption list

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Wed, 11 Nov 2009 19:28:11 +0000 (11:28 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: partial revert to fix double brelse WARNING()
  ext4: Fix return value of ext4_split_unwritten_extents() to fix direct I/O
  ext4: code clean up for dio fallocate handling
  ext4: skip conversion of uninit extents after direct IO if there isn't any
  ext4: fix ext4_ext_direct_IO()'s return value after converting uninit extents
  ext4: discard preallocation when restarting a transaction during truncate

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Wed, 11 Nov 2009 19:27:49 +0000 (11:27 -0800)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] SBC-FITPC2 watchdog driver registration fix

14 years agoMerge branch 'fixes-s3c-2632-rc6' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Wed, 11 Nov 2009 19:27:26 +0000 (11:27 -0800)]
Merge branch 'fixes-s3c-2632-rc6' of git://git.fluff.org/bjdooks/linux

* 'fixes-s3c-2632-rc6' of git://git.fluff.org/bjdooks/linux:
  ARM: S3C64XX: DMA: Free node for non-circular queues
  ARM: S3C64XX: DMA: Callback with correct buffer pointer
  ARM: S3C64XX: DMA: Make src and dst transfer size same
  ARM: S3C64XX: DMA: Unify callback functions for success/failure
  ARM: S3C64XX: DMA: Protect buffer pointers while manipulation
  ARM: S3C64XX: Tidy definition and comments in s3c_dma_has_circular()
  ARM: S3C64XX: Remove duplicate s3c_dma_has_circular() definition for S3C64xx.
  ARM: SMDK6410: Allocate more GPIO space for WM1190-EV1
  ARM: SMDK6410: Configure GPIO pull up for WM835x IRQ line

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Wed, 11 Nov 2009 19:26:42 +0000 (11:26 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (27 commits)
  V4L/DVB (13314): saa7134: set ts_force_val for the Hauppauge WinTV HVR-1150
  V4L/DVB (13313): saa7134: add support for FORCE_TS_VALID mode for mpeg ts input
  V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to type mismatch with abs()
  V4L/DVB (13309): uvcvideo: Ignore the FIX_BANDWIDTH for compressed video
  V4L/DVB (13287): ce6230 - saa7164-cmd: Fix wrong sizeof
  V4L/DVB (13286): pxa-camera: Fix missing sched.h
  V4L/DVB (13264): gspca_mr97310a: Change vstart for CIF sensor type 1 cams
  V4L/DVB (13257): gspca - m5602-s5k4aa: Add vflip for Fujitsu Amilo Xi 2528
  V4L/DVB (13256): gspca - m5602-s5k4aa: Add another MSI GX700 vflip quirk
  V4L/DVB (13255): gspca - m5602-s5k4aa: Add vflip quirk for the Bruneinit laptop
  V4L/DVB (13240): firedtv: fix regression: tuning fails due to bogus error return
  V4L/DVB (13237): firedtv: length field corrupt in ca2host if length>127
  V4L/DVB (13230): s2255drv: Don't conditionalize video buffer completion on waiting processes
  V4L/DVB (13202): smsusb: add autodetection support for three additional Hauppauge USB IDs
  V4L/DVB (13190): em28xx: fix panic that can occur when starting audio streaming
  V4L/DVB (13170): bttv: Fix reversed polarity error when switching video standard
  V4L/DVB (13169): bttv: Fix potential out-of-order field processing
  V4L/DVB (13167): pt1: Fix a compile error on arm
  V4L/DVB (13132): fix use-after-free Oops, resulting from a driver-core API change
  V4L/DVB (13131): pxa_camera: fix camera pixel format configuration
  ...

14 years agoBtrfs: allow more metadata chunk preallocation
Chris Mason [Wed, 11 Nov 2009 15:16:57 +0000 (10:16 -0500)]
Btrfs: allow more metadata chunk preallocation

On an FS where all of the space has not been allocated into chunks yet,
the enospc can return enospc just because the existing metadata chunks
are full.

We get around this by allowing more metadata chunks to be allocated up
to a certain limit, and finding the right limit is a little fuzzy.  The
problem is the reservations for delalloc would preallocate way too much
of the FS as metadata.  We need to start saying no and just force some
IO to happen.

But we also need to let a reasonable amount of the FS become metadata.
This bumps the hard limit up, later releases will have a better system.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fallback on uncompressed io if compressed io fails
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: fallback on uncompressed io if compressed io fails

Currently compressed IO does not deal with not having its entire extent able to
be allocated.  So if we have enough free space to allocate for the extent, but
its not contiguous, it will fail spectacularly.  This patch fixes this by
falling back on uncompressed IO which lets us spread the delalloc extent across
multiple extents.  I tested this by making us randomly think the reservation had
failed to make it fallback on the uncompressed io way and it seemed to work
fine.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: find ideal block group for caching
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: find ideal block group for caching

This patch changes a few things.  Hopefully the comments are helpfull, but
I'll try and be as verbose here.

Problem:

My fedora box was taking 1 minute and 21 seconds to boot with btrfs as root.
Part of this problem was we pick the first block group we can find and start
caching it, even if it may not have enough free space.  The other problem is
we only search for cached block groups the first time around, which we won't
find any cached block groups because this is a newly mounted fs, so we end up
caching several block groups during bootup, which with alot of fragmentation
takes around 30-45 seconds to complete, which bogs down the system.  So

Solution:

1) Don't cache block groups willy-nilly at first.  Instead try and figure out
which block group has the most free, and therefore will take the least amount
of time to cache.

2) Don't be so picky about cached block groups.  The other problem is once
we've filled up a cluster, if the block group isn't finished caching the next
time we try and do the allocation we'll completely ignore the cluster and
start searching from the beginning of the space, which makes us cache more
block groups, which slows us down even more.  So instead of skipping block
groups that are not finished caching when we have a hint, only skip the block
group if it hasn't started caching yet.

There is one other tweak in here.  Before if we allocated a chunk and still
couldn't find new space, we'd end up switching the space info to force another
chunk allocation.  This could make us end up with way too many chunks, so keep
track of this particular case.

With this patch and my previous cluster fixes my fedora box now boots in 43
seconds, and according to the bootchart is not held up by our block group
caching at all.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: avoid null deref in unpin_extent_cache()
Dan Carpenter [Tue, 10 Nov 2009 09:01:43 +0000 (09:01 +0000)]
Btrfs: avoid null deref in unpin_extent_cache()

I re-orderred the checks to avoid dereferencing "em" if it was null.

Found by smatch static checker.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: skip btrfs_release_path in btrfs_update_root and btrfs_del_root
Li Dongyang [Fri, 6 Nov 2009 14:33:01 +0000 (14:33 +0000)]
Btrfs: skip btrfs_release_path in btrfs_update_root and btrfs_del_root

We don't need to call btrfs_release_path because btrfs_free_path will do
that for us.

Signed-off-by: Li Dongyang <Jerry87905@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fix some metadata enospc issues
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: fix some metadata enospc issues

We weren't reserving metadata space for rename, rmdir and unlink, which could
cause problems.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fix how we set max_size for free space clusters
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: fix how we set max_size for free space clusters

This patch fixes a problem where max_size can be set to 0 even though we
filled the cluster properly.  We set max_size to 0 if we restart the cluster
window, but if the new start entry is big enough to be our new cluster then we
could return with a max_size set to 0, which will mean the next time we try to
allocate from this cluster it will fail.  So set max_extent to the entry's
size.  Tested this on my box and now we actually allocate from the cluster
after we fill it.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: cleanup transaction starting and fix journal_info usage
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: cleanup transaction starting and fix journal_info usage

We use journal_info to tell if we're in a nested transaction to make sure we
don't commit the transaction within a nested transaction.  We use another
method to see if there are any outstanding ioctl trans handles, so if we're
starting one do not set current->journal_info, since it will screw with other
filesystems.  This patch also cleans up the starting stuff so there aren't any
magic numbers.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fix data allocation hint start
Josef Bacik [Wed, 11 Nov 2009 02:23:47 +0000 (21:23 -0500)]
Btrfs: fix data allocation hint start

Sometimes our start allocation hint when we cow a file can be either
EXTENT_HOLE or some other such place holder, which is not optimal.  So if we
find that our em->block_start is one of these special values, check to see
where the first block of the inode is stored, and use that as a hint.  If that
block is also a special value, just fallback on a hint of 0 and let the
allocator figure out a good place to put the data.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoomap3: update Pandora defconfig
Grazvydas Ignotas [Wed, 11 Nov 2009 19:00:38 +0000 (11:00 -0800)]
omap3: update Pandora defconfig

This patch updates defconfig to enable options needed to properly
boot OMAP3 pandora board. It also enables MMC, OTG, GPIO LEDs,
TWL4030 GPIO and sound drivers.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: 3430sdp: Enable Linux Regulator framework
Sergio Aguirre [Wed, 11 Nov 2009 19:00:37 +0000 (11:00 -0800)]
omap3: 3430sdp: Enable Linux Regulator framework

Some drivers have dependencies on this, and therefore should be
enabled.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: beagle: Fix USB host port power control
Jarkko Nikula [Wed, 11 Nov 2009 19:00:36 +0000 (11:00 -0800)]
omap3: beagle: Fix USB host port power control

The host port power is enabled by driving the nEN_USB_PWR low as stated in
the comment. This fix is originally from Steve Sakoman <steve@sakoman.com>.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: pandora: Fix keypad keymap
Grazvydas Ignotas [Wed, 11 Nov 2009 19:00:35 +0000 (11:00 -0800)]
omap3: pandora: Fix keypad keymap

The original TWL4030 keypad driver from linux-omap used KEY()
macro defined as (col, row), but while it was merged upstream
it was changed to use matrix keypad infrastructure, which uses
(row, col) format. Update the keymap in board file to match
layout of mainline driver.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: Amstrad Delta defconfig fixes
Janusz Krzysztofik [Wed, 11 Nov 2009 19:00:34 +0000 (11:00 -0800)]
omap1: Amstrad Delta defconfig fixes

The patch provides the following fixes:

- keep kernel small enough to boot with standard tools,
- ensure compatibility with both new and legacy distros,
- turn on support for recently added or fixed hardware features.

Created and tested against linux-2.6.32-rc5.

Signed-off-by: Janusz Krzysztofik <jkrzysz@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: Fix omapfb/lcdc on OMAP1510 broken when PM set
Janusz Krzysztofik [Wed, 11 Nov 2009 19:00:03 +0000 (11:00 -0800)]
omap: Fix omapfb/lcdc on OMAP1510 broken when PM set

With CONFIG_PM=y, the omapfb/lcdc device on Amstrad Delta, after initially
starting correctly, breaks with the following error messages:

omapfb omapfb: resetting (status 0xffffff96,reset count 1)
...
omapfb omapfb: resetting (status 0xffffff96,reset count 100)
omapfb omapfb: too many reset attempts, giving up.

Looking closer at this I have found that it had been broken almost 2 years ago
with commit 2418996e3b100114edb2ae110d5d4acb928909d2, PM fixes for OMAP1.

The definite reason for broken omapfb/lcdc behavoiur in PM mode
appeared to be ARM_IDLECT1:IDLIF_ARM (bit 6) put into idle regardless of LCD
DMA possibly running. The bit were set based on return value of the
omap_dma_running() function that did not check for dedicated LCD DMA
channel status. The patch below fixes this.

Note that the hardcoded register value will be fixed during the next merge
cycle to use OMAP_LCDC_ defines. Currently the OMAP_LCDC_ defines are local
to drivers/video/omap/lcdc.c, so let's not start moving those right now.

Created against linux-2.6.32-rc6

Tested on Amstrad Delta

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoJBD/JBD2: free j_wbuf if journal init fails.
Tao Ma [Tue, 10 Nov 2009 09:13:22 +0000 (17:13 +0800)]
JBD/JBD2: free j_wbuf if journal init fails.

If journal init fails, we need to free j_wbuf.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext3: Wait for proper transaction commit on fsync
Jan Kara [Fri, 16 Oct 2009 17:26:15 +0000 (19:26 +0200)]
ext3: Wait for proper transaction commit on fsync

We cannot rely on buffer dirty bits during fsync because pdflush can come
before fsync is called and clear dirty bits without forcing a transaction
commit. What we do is that we track which transaction has last changed
the inode and which transaction last changed allocation and force it to
disk on fsync.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
14 years agoext3: retry failed direct IO allocations
Eric Sandeen [Tue, 13 Oct 2009 02:34:27 +0000 (21:34 -0500)]
ext3: retry failed direct IO allocations

On a 256M 4k block filesystem, doing this in a loop:

    dd if=/dev/zero of=test oflag=direct bs=1M count=64
    rm -f test

eventually leads to spurious ENOSPC:

    dd: writing `test': No space left on device

As with other block allocation callers, it looks like we need to
potentially retry the allocations on the initial ENOSPC.

A similar patch went into ext4 (commit
fbbf69456619de5d251cb9f1df609069178c62d5)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Wed, 11 Nov 2009 07:10:31 +0000 (08:10 +0100)]
Merge branch 'fix/hda' into for-linus

14 years agoALSA: hda - possible read past array alc88[02]_parse_auto_config()
Roel Kluin [Tue, 10 Nov 2009 19:11:55 +0000 (20:11 +0100)]
ALSA: hda - possible read past array alc88[02]_parse_auto_config()

The test of index `i' is after the read - too late - and
unsafe: if snd_hda_get_connections() fails in the last
iteration a read beyond the array is possible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoInput: fix locking in memoryless force-feedback devices
Dmitry Torokhov [Sat, 7 Nov 2009 05:39:07 +0000 (21:39 -0800)]
Input: fix locking in memoryless force-feedback devices

Now that input core acquires dev->event_lock spinlock and disables
interrupts when propagating input events, using spin_lock_bh() in
ff-memless driver is not allowed. Actually, the timer_lock itself
is not needed anymore, we should simply use dev->event_lock
as well.

Also do a small cleanup in force-feedback core.

Reported-by: kerneloops.org
Reported-by: http://www.kerneloops.org/searchweek.php?search=ml_ff_set_gain
Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agopowerpc: pasemi_defconfig update
Olof Johansson [Tue, 6 Oct 2009 15:52:50 +0000 (10:52 -0500)]
powerpc: pasemi_defconfig update

pasemi_defconfig hasn't been updated for a year.

Mostly a refresh of defaults, but this also disables 64K pages.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoMerge commit 'kumar/merge' into merge
Benjamin Herrenschmidt [Wed, 11 Nov 2009 04:43:25 +0000 (15:43 +1100)]
Merge commit 'kumar/merge' into merge

14 years agoomap: Use resource_size
Tobias Klauser [Wed, 11 Nov 2009 02:55:19 +0000 (18:55 -0800)]
omap: Use resource_size

Use the resource_size function instead of manually calculating the
resource size. This reduces the chance of introducing off-by-one errors
and actually fixes one in mailbox.c.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: Fix race condition in omap dma driver
Tao Hu [Wed, 11 Nov 2009 02:55:17 +0000 (18:55 -0800)]
omap: Fix race condition in omap dma driver

The bug could cause irq enable bit of one DMA channel is
cleared/set unexpectedly when 2 (or more) drivers are calling
omap_request_dma()/omap_free_dma() simultaneously

Signed-off-by: Fei Yang <AFY095@motorola.com>
Signed-off-by: Tao Hu <taohu@motorola.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoMerge branch 'for-rmk' of git://linux-arm.org/linux-2.6
Russell King [Tue, 10 Nov 2009 23:37:21 +0000 (23:37 +0000)]
Merge branch 'for-rmk' of git://linux-arm.org/linux-2.6

14 years agosound: rawmidi: fix MIDI device O_APPEND error handling
Clemens Ladisch [Wed, 21 Oct 2009 07:11:43 +0000 (09:11 +0200)]
sound: rawmidi: fix MIDI device O_APPEND error handling

Commit 9a1b64caac82aa02cb74587ffc798e6f42c6170a in 2.6.30 broke the
error handling code in rawmidi_open_priv().

If only the output substream of a RawMIDI device has been opened and
if this device is then opened with O_RDWR | O_APPEND and if the
initialization of the input substream fails (either because of low
memory or because the device driver's open callback fails), then the
runtime structure of the already open output substream will be freed
and all following writes through the first handle will cause
snd_rawmidi_write() to use the NULL runtime pointer.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agosound: rawmidi: fix checking of O_APPEND when opening MIDI device
Clemens Ladisch [Wed, 21 Oct 2009 07:10:16 +0000 (09:10 +0200)]
sound: rawmidi: fix checking of O_APPEND when opening MIDI device

Commit 9a1b64caac82aa02cb74587ffc798e6f42c6170a in 2.6.30 dropped the
check that a substream must already have been opened with O_APPEND to be
able to open it a second time.

This would make it possible for a substream to be switched to append
mode, which would mean that non-atomic writes would fail unexpectedly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agosound: rawmidi: fix double init when opening MIDI device with O_APPEND
Clemens Ladisch [Wed, 21 Oct 2009 07:09:38 +0000 (09:09 +0200)]
sound: rawmidi: fix double init when opening MIDI device with O_APPEND

Commit 9a1b64caac82aa02cb74587ffc798e6f42c6170a in 2.6.30 moved the
substream initialization code to where it would be executed every time
the substream is opened.

This had the consequence that any further opening would drop and leak
the data in the existing buffer, and that the device driver's open
callback would be called multiple times, unexpectedly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Avoid quirk for HP dc5750
Takashi Iwai [Tue, 10 Nov 2009 15:08:45 +0000 (16:08 +0100)]
ALSA: hda - Avoid quirk for HP dc5750

The present quirk for HP dc5750 seems broken and maps the pins wrongly.
Since the auto-parser works well for this device, set the default entry
to use model=auto.

Reference: Novell bnc#552154
https://bugzilla.novell.com/show_bug.cgi?id=552154

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years ago[WATCHDOG] SBC-FITPC2 watchdog driver registration fix
Denis Turischev [Thu, 5 Nov 2009 11:32:40 +0000 (13:32 +0200)]
[WATCHDOG] SBC-FITPC2 watchdog driver registration fix

This patch fixes device registration process.

Signed-off-by: Denis Turischev <denis@compulab.co.il>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
14 years agoARM: Use a definition for the userspace cmpxchg emulation syscall
Russell King [Mon, 9 Nov 2009 23:53:29 +0000 (23:53 +0000)]
ARM: Use a definition for the userspace cmpxchg emulation syscall

Use a definition for the cmpxchg SWI instead of hard-coding the number.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
14 years agoALSA: hda - Tweak OLPC XO-1.5 microphone bias
Daniel Drake [Mon, 9 Nov 2009 15:17:24 +0000 (15:17 +0000)]
ALSA: hda - Tweak OLPC XO-1.5 microphone bias

Our contacts at Conexant suggested that we reduce the external
microphone bias to 50% in order to center the input signal with
the DC input range of the codec. This is because the microphone
port is DC coupled for potential use with sensors.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agox86, amd-ucode: Check UCODE_MAGIC before loading the container file
Borislav Petkov [Thu, 29 Oct 2009 13:45:52 +0000 (14:45 +0100)]
x86, amd-ucode: Check UCODE_MAGIC before loading the container file

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20091029134552.GC30802@alberich.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agodrm/kms: Init the CRTC info fields for modes forced from the command line.
Francisco Jerez [Sat, 7 Nov 2009 15:27:32 +0000 (16:27 +0100)]
drm/kms: Init the CRTC info fields for modes forced from the command line.

Fixes fdo bug 24710.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/r600: CS parser updates
Alex Deucher [Mon, 9 Nov 2009 21:41:21 +0000 (16:41 -0500)]
drm/radeon/r600: CS parser updates

Add some additional regs that require relocs.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agohighmem: Fix debug_kmap_atomic() to also handle KM_IRQ_PTE, KM_NMI, and KM_NMI_PTE
Soeren Sandmann [Wed, 28 Oct 2009 17:56:35 +0000 (18:56 +0100)]
highmem: Fix debug_kmap_atomic() to also handle KM_IRQ_PTE, KM_NMI, and KM_NMI_PTE

Previously calling debug_kmap_atomic() with these types would
cause spurious warnings.

(triggered by SysProf using perf events)

Signed-off-by: Soeren Sandmann Pedersen <sandmann@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: a.p.zijlstra@chello.nl
Cc: <stable@kernel.org> # .31.x
LKML-Reference: <ye8vdhz8krw.fsf@camel23.daimi.au.dk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agohighmem: Fix race in debug_kmap_atomic() which could cause warn_count to underflow
Soeren Sandmann [Wed, 28 Oct 2009 17:55:36 +0000 (18:55 +0100)]
highmem: Fix race in debug_kmap_atomic() which could cause warn_count to underflow

debug_kmap_atomic() tries to prevent ever printing more than 10
warnings, but it does so by testing whether an unsigned integer
is equal to 0. However, if the warning is caused by a nested
IRQ, then this counter may underflow and the stream of warnings
will never end.

Fix that by using a signed integer instead.

Signed-off-by: Soeren Sandmann Pedersen <sandmann@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: a.p.zijlstra@chello.nl
Cc: <stable@kernel.org> # .31.x
LKML-Reference: <ye8zl7b8ktj.fsf@camel23.daimi.au.dk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoARM: S3C: Merge fixes-s3c64xx-dma
Ben Dooks [Mon, 9 Nov 2009 23:52:34 +0000 (23:52 +0000)]
ARM: S3C: Merge fixes-s3c64xx-dma

Merge branch 'fixes-s3c64xx-dma' into fixes-s3c-2632-rc6

14 years agoARM: S3C64XX: DMA: Free node for non-circular queues
Jassi Brar [Thu, 5 Nov 2009 04:44:39 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Free node for non-circular queues

We need to free the buff and lli nodes if the buffer queue is
not CIRCULAR.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: DMA: Callback with correct buffer pointer
Jassi Brar [Thu, 5 Nov 2009 04:44:33 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Callback with correct buffer pointer

buffdone callback should be called per buffer request with pointer
to the latest serviced request.
'next' should point to the one next to currently active.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: DMA: Make src and dst transfer size same
Jassi Brar [Thu, 5 Nov 2009 04:44:45 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Make src and dst transfer size same

Some devices don't seem to work if the source and desitnation transfer
widths are not same. For example, SPI dma xfers, with 8bits/word,
don't work without this patch.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: DMA: Unify callback functions for success/failure
Jassi Brar [Thu, 5 Nov 2009 04:44:26 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Unify callback functions for success/failure

Replace s3c64xx_dma_tcirq and s3c64xx_dma_errirq with the common
s3c64xx_dma_buffdone.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: DMA: Protect buffer pointers while manipulation
Jassi Brar [Thu, 5 Nov 2009 04:44:20 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Protect buffer pointers while manipulation

Ensure the DMA buffer points are not updated from
another source during the process of enquing a buffer.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
[ben-linux@fluff.org: Updated patch comment]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: Tidy definition and comments in s3c_dma_has_circular()
Ben Dooks [Mon, 9 Nov 2009 23:45:47 +0000 (23:45 +0000)]
ARM: S3C64XX: Tidy definition and comments in s3c_dma_has_circular()

The recent changes to arch/arm/mach-s3c6400/include/mach/dma.h have
left an out of date comment in there as well as accidentally changing
the type of the function.

Fix the commit 54489cd46a3a268ed981c681726c6d690883f076

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: Remove duplicate s3c_dma_has_circular() definition for S3C64xx.
Maurus Cuelenaere [Wed, 4 Nov 2009 12:13:29 +0000 (13:13 +0100)]
ARM: S3C64XX: Remove duplicate s3c_dma_has_circular() definition for S3C64xx.

This patch removes the duplicated s3c_dma_has_circular() definition and so fixes
compilation for S3C64xx.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: SMDK6410: Allocate more GPIO space for WM1190-EV1
Mark Brown [Tue, 3 Nov 2009 14:42:10 +0000 (14:42 +0000)]
ARM: SMDK6410: Allocate more GPIO space for WM1190-EV1

The WM835x has some GPIOs on it, allocate some space so we can use
them with gpiolib.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: SMDK6410: Configure GPIO pull up for WM835x IRQ line
Mark Brown [Tue, 3 Nov 2009 14:42:04 +0000 (14:42 +0000)]
ARM: SMDK6410: Configure GPIO pull up for WM835x IRQ line

When used with the WM1190-EV1 board we can use the internal pull up
resistor of the CPU to provide the required pull for the IRQ line.
Without this interrupts from the WM835x don't work in the default
WM1190-EV1 hardwaer configuration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agomtd/maps: Fix accidental removal in Makefile
Atsushi Nemoto [Mon, 9 Nov 2009 23:21:19 +0000 (23:21 +0000)]
mtd/maps: Fix accidental removal in Makefile

The commit d79c326 ("gpio-addr-flash: new driver for GPIO assisted
flash addressing") removed two lines from the Makefile by accident.
Though I'm not sure how this accident happened, this patch reverts the
removal.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agointel-iommu: Check for 'DMAR at zero' BIOS error earlier.
David Woodhouse [Mon, 9 Nov 2009 22:15:15 +0000 (22:15 +0000)]
intel-iommu: Check for 'DMAR at zero' BIOS error earlier.

Chris Wright has some patches which let us fall back to swiotlb nicely
if IOMMU initialisation fails. But those are a bit much for 2.6.32.

Instead, let's shift the check for the biggest problem, the HP and Acer
BIOS bug which reports a DMAR at physical address zero. That one can
actually be checked much earlier -- before we even admit to having
detected an IOMMU in the first place. So the swiotlb init goes ahead as
we want.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoALSA: hda: Use model=auto quirk for Sony VAIO VGN-FW170J using ALC262
Daniel T Chen [Mon, 9 Nov 2009 00:03:55 +0000 (19:03 -0500)]
ALSA: hda: Use model=auto quirk for Sony VAIO VGN-FW170J using ALC262

BugLink: https://bugs.launchpad.net/bugs/478309
The internal microphone on this VAIO model does not work unless the
"auto" quirk is used.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Mon, 9 Nov 2009 17:58:31 +0000 (09:58 -0800)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Add an interface to lock/unlock an I2C bus segment
  i2c-piix4: Modify code name SB900 to Hudson-2

14 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Mon, 9 Nov 2009 17:57:02 +0000 (09:57 -0800)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md/raid5: make sure curr_sync_completes is uptodate when reshape starts
  md: don't clear endpoint for resync when resync is interrupted.

14 years agoksm: cond_resched in unstable tree
Hugh Dickins [Mon, 9 Nov 2009 15:58:23 +0000 (15:58 +0000)]
ksm: cond_resched in unstable tree

KSM needs a cond_resched() for CONFIG_PREEMPT_NONE, in its unbounded
search of the unstable tree.  The stable tree cases already have one,
and originally there was one down inside get_user_pages();
but I missed it when I converted to follow_page() instead.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Mon, 9 Nov 2009 17:52:55 +0000 (09:52 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: fix missing cleanup of gc cache on error cases
  nilfs2: fix kernel oops in error case of nilfs_ioctl_move_blocks

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:51:42 +0000 (09:51 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
  net/fsl_pq_mdio: add module license GPL
  can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo()
  can: should not use __dev_get_by_index() without locks
  hisax: remove bad udelay call to fix build error on ARM
  ipip: Fix handling of DF packets when pmtudisc is OFF
  qlge: Set PCIe reset type for EEH to fundamental.
  qlge: Fix early exit from mbox cmd complete wait.
  ixgbe: fix traffic hangs on Tx with ioatdma loaded
  ixgbe: Fix checking TFCS register for TXOFF status when DCB is enabled
  ixgbe: Fix gso_max_size for 82599 when DCB is enabled
  macsonic: fix crash on PowerBook 520
  NET: cassini, fix lock imbalance
  ems_usb: Fix byte order issues on big endian machines
  be2net: Bug fix to send config commands to hardware after netdev_register
  be2net: fix to set proper flow control on resume
  netfilter: xt_connlimit: fix regression caused by zero family value
  rt2x00: Don't queue ieee80211 work after USB removal
  Revert "ipw2200: fix oops on missing firmware"
  decnet: netdevice refcount leak
  netfilter: nf_nat: fix NAT issue in 2.6.30.4+
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:51:15 +0000 (09:51 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: Move of_set_property_mutex acquisition outside of devtree_lock grab.
  sparc64: replace parentheses in pmul()
  sparc64: Add a comment about why we only use certain memory barriers these days.

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:50:55 +0000 (09:50 -0800)]
Merge git://git./linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  Revert "ide: try to use PIO Mode 0 during probe if possible"

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:50:15 +0000 (09:50 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: don't use CIFSGetSrvInodeNumber in is_path_accessible
  cifs: clean up handling when server doesn't consistently support inode numbers

14 years agoMerge branch 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Mon, 9 Nov 2009 17:49:58 +0000 (09:49 -0800)]
Merge branch 'sh/for-2.6.32' of git://git./linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Replace old style lock initializer
  sh: Account for cache aliases in flush_icache_range()
  sh: unwinder: Fix up invalid PC refetch in dwarf unwinder.
  serial: sh-sci: disable callback typo fix

14 years agoMerge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
Linus Torvalds [Mon, 9 Nov 2009 17:47:21 +0000 (09:47 -0800)]
Merge branch 'for-linus' of git://linux-m32r.org/git/takata/linux-2.6_dev

* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
  m32r: fix arch/m32r/boot/compressed/Makefile

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:30:14 +0000 (09:30 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: snd-aica: declare MODULE_FIRMWARE
  ALSA: hda - Don't initialize CORB/RIRB for single_cmd mode
  ALSA: usb-audio: fix combine_word problem
  sound: Replace old style lock initializer
  ASoC: S3C64XX I2S: Enable audio-bus clock
  ASoC: OMAP: Don't try to set unsupported OMAP_DMA_DATA_BURST_16 on OMAP1
  ALSA: hda, move hp_bseries_system
  sound: Use KERN_WARNING instead of KERN_WARN, which does not exist
  ALSA: intel8x0: Mute External Amplifier by default for another Sony model
  ALSA: hda - Add OLPC XO-1.5 PCI ID
  ALSA: hda - Enable GPIO control for mute LED on HP systems

14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Mon, 9 Nov 2009 17:28:42 +0000 (09:28 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: sleep: another HP/Compaq DMI entries for init_set_sci_en_on_resume
  ACPI: add DMI entry for SCI_EN resume quirk on HP dv4
  thermal: sysfs-api.txt - document passive attribute for thermal zones
  thermal: sysfs-api.txt - reformat for improved readability
  acpi: thermal: Add EOL to the trip_point_N_type strings
  ACPI: Move dereference after NULL test
  ACPICA: avoid "Info: mapping multiple BARs. Your kernel is fine."
  ACPI: add __cpuinit to acpi_processor_add()
  acpi-power-meter: Don't leak ACPI error codes to userspace
  eeepc-laptop: don't enable camera at startup if it's already on.
  Revert "eeepc-laptop: Prevent a panic when disabling RT2860 wireless when associated"
  ACPI: clean up video.c boundary checks and types

14 years agosh: Replace old style lock initializer
Thomas Gleixner [Fri, 6 Nov 2009 22:42:05 +0000 (22:42 +0000)]
sh: Replace old style lock initializer

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Account for cache aliases in flush_icache_range()
Matt Fleming [Thu, 5 Nov 2009 23:14:39 +0000 (23:14 +0000)]
sh: Account for cache aliases in flush_icache_range()

The icache may also contain aliases so we must account for them just
like we do when manipulating the dcache. We usually get away with
aliases in the icache because the instructions that are read from memory
are read-only, i.e. they never change. However, the place where this
bites us is when the code has been modified.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>