firefly-linux-kernel-4.4.55.git
13 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Thu, 23 Jun 2011 04:08:52 +0000 (21:08 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PCI / PM: Block races between runtime PM and system sleep
  PM / Domains: Update documentation
  PM / Runtime: Handle clocks correctly if CONFIG_PM_RUNTIME is unset
  PM: Fix async resume following suspend failure
  PM: Free memory bitmaps if opening /dev/snapshot fails
  PM: Rename dev_pm_info.in_suspend to is_prepared
  PM: Update documentation regarding sysdevs
  PM / Runtime: Update doc: usage count no longer incremented across system PM

13 years agomm, hotplug: protect zonelist building with zonelists_mutex
David Rientjes [Thu, 23 Jun 2011 01:13:04 +0000 (18:13 -0700)]
mm, hotplug: protect zonelist building with zonelists_mutex

Commit 959ecc48fc75 ("mm/memory_hotplug.c: fix building of node hotplug
zonelist") does not protect the build_all_zonelists() call with
zonelists_mutex as needed.  This can lead to races in constructing
zonelist ordering if a concurrent build is underway.  Protecting this
with lock_memory_hotplug() is insufficient since zonelists can be
rebuild though sysfs as well.

Signed-off-by: David Rientjes <rientjes@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomm, hotplug: fix error handling in mem_online_node()
David Rientjes [Thu, 23 Jun 2011 01:13:01 +0000 (18:13 -0700)]
mm, hotplug: fix error handling in mem_online_node()

The error handling in mem_online_node() is incorrect: hotadd_new_pgdat()
returns NULL if the new pgdat could not have been allocated and a pointer
to it otherwise.

mem_online_node() should fail if hotadd_new_pgdat() fails, not the
inverse.  This fixes an issue when memoryless nodes are not onlined and
their sysfs interface is not registered when their first cpu is brought
up.

The bug was introduced by commit cf23422b9d76 ("cpu/mem hotplug: enable
CPUs online before local memory online") iow v2.6.35.

Signed-off-by: David Rientjes <rientjes@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoCIFS: Fix problem with 3.0-rc1 null user mount failure
Pavel Shilovsky [Mon, 20 Jun 2011 08:33:16 +0000 (12:33 +0400)]
CIFS: Fix problem with 3.0-rc1 null user mount failure

Figured it out: it was broken by b946845a9dc523c759cae2b6a0f6827486c3221a commit - "cifs: cifs_parse_mount_options: do not tokenize mount options in-place". So, as a quick fix I suggest to apply this patch.

[PATCH] CIFS: Fix kfree() with constant string in a null user case

Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agodrm/i915: save/resume forcewake lock fixes
Ben Widawsky [Wed, 22 Jun 2011 16:55:01 +0000 (09:55 -0700)]
drm/i915: save/resume forcewake lock fixes

The lock must be held for the saving and restoring of VGA state.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
CC: Alexander Zhaunerchyk <alex.vizor@gmail.com>
CC: Andrey Rahmatullin <wrar@wrar.name>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years ago[S390] allow setting of upper 32 bit in smp_ctl_set_bit
Jan Glauber [Wed, 22 Jun 2011 14:24:10 +0000 (16:24 +0200)]
[S390] allow setting of upper 32 bit in smp_ctl_set_bit

The bit shift operation in smp_ctl_set_bit does not specify the type
of the shifted bit so integer is used as default. Therefore it is not
possible to set bits in the upper 32 bit of the control register if
the kernel runs in 64 bit mode. Fix this by specifying the type as
unsigned long.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] hwsampler: Set a sane default sampling rate
Christian Borntraeger [Wed, 22 Jun 2011 14:24:09 +0000 (16:24 +0200)]
[S390] hwsampler: Set a sane default sampling rate

The sampling interval for the hardware sampler is specified in cycles.
(see SA23-2260-01 The Load-Program-Parameter and the CPU-Measurement
Facilities)
The current default value will therefore result in millions of samples.
This patch changes the default sampling interval to 4M, which will
result in ~1500 samples per second on a z196 reducing the overhead
of sampling.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] s390: enforce HW limits for the initial sampling rate
Christian Borntraeger [Wed, 22 Jun 2011 14:24:08 +0000 (16:24 +0200)]
[S390] s390: enforce HW limits for the initial sampling rate

On specific configurations with hwsampler opcontrol --start returns an
error on "echo 1 >/dev/oprofile/enable". Turns out that the hw sampling
interval is not checked against the hardware limits.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] kvm-s390: fix kconfig dependencies
Christian Borntraeger [Wed, 22 Jun 2011 14:24:07 +0000 (16:24 +0200)]
[S390] kvm-s390: fix kconfig dependencies

A user can create the Kconfig combination !VIRTUALIZATION, S390_GUEST
which results in the following warnings:

warning: (S390_GUEST) selects VIRTIO which has unmet direct dependencies (VIRTUALIZATION)
warning: (S390_GUEST && VIRTIO_PCI && VIRTIO_BALLOON) selects VIRTIO_RING which has unmet direct dependencies (VIRTUALIZATION && VIRTIO)
warning: (S390_GUEST) selects VIRTIO which has unmet direct dependencies (VIRTUALIZATION)
warning: (S390_GUEST && VIRTIO_PCI && VIRTIO_BALLOON) selects VIRTIO_RING which has unmet direct dependencies (VIRTUALIZATION && VIRTIO)

S390_GUEST has to select VIRTUALIZATION before selecting VIRTIO and
friends.

Reported-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years agoKEYS: Fix error handling in construct_key_and_link()
David Howells [Tue, 21 Jun 2011 13:32:05 +0000 (14:32 +0100)]
KEYS: Fix error handling in construct_key_and_link()

Fix error handling in construct_key_and_link().

If construct_alloc_key() returns an error, it shouldn't pass out through
the normal path as the key_serial() called by the kleave() statement
will oops when it gets an error code in the pointer:

  BUG: unable to handle kernel paging request at ffffffffffffff84
  IP: [<ffffffff8120b401>] request_key_and_link+0x4d7/0x52f
  ..
  Call Trace:
   [<ffffffff8120b52c>] request_key+0x41/0x75
   [<ffffffffa00ed6e8>] cifs_get_spnego_key+0x206/0x226 [cifs]
   [<ffffffffa00eb0c9>] CIFS_SessSetup+0x511/0x1234 [cifs]
   [<ffffffffa00d9799>] cifs_setup_session+0x90/0x1ae [cifs]
   [<ffffffffa00d9c02>] cifs_get_smb_ses+0x34b/0x40f [cifs]
   [<ffffffffa00d9e05>] cifs_mount+0x13f/0x504 [cifs]
   [<ffffffffa00caabb>] cifs_do_mount+0xc4/0x672 [cifs]
   [<ffffffff8113ae8c>] mount_fs+0x69/0x155
   [<ffffffff8114ff0e>] vfs_kern_mount+0x63/0xa0
   [<ffffffff81150be2>] do_kern_mount+0x4d/0xdf
   [<ffffffff81152278>] do_mount+0x63c/0x69f
   [<ffffffff8115255c>] sys_mount+0x88/0xc2
   [<ffffffff814fbdc2>] system_call_fastpath+0x16/0x1b

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMN10300: asm/uaccess.h needs to #include linux/kernel.h for might_sleep()
David Howells [Tue, 21 Jun 2011 09:29:51 +0000 (10:29 +0100)]
MN10300: asm/uaccess.h needs to #include linux/kernel.h for might_sleep()

MN10300's asm/uaccess.h needs to #include linux/kernel.h to get might_sleep()
otherwise it fails to build on MN10300 allyesconfig.  This fails in a few
places with messages like the following:

  In file included from security/keys/trusted.c:14:
  include/linux/uaccess.h: In function '__copy_from_user_nocache':
  include/linux/uaccess.h:52: error: implicit declaration of function 'might_sleep'

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Wed, 22 Jun 2011 01:20:55 +0000 (18:20 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  NFS: Fix decode_secinfo_maxsz
  NFSv4.1: Fix an off-by-one error in pnfs_generic_pg_test
  NFSv4.1: Fix some issues with pnfs_generic_pg_test
  NFSv4.1: file layout must consider pg_bsize for coalescing
  pnfs-obj: No longer needed to take an extra ref at add_device
  SUNRPC: Ensure the RPC client only quits on fatal signals
  NFSv4: Fix a readdir regression
  nfs4.1: mark layout as bad on error path in _pnfs_return_layout
  nfs4.1: prevent race that allowed use of freed layout in _pnfs_return_layout
  NFSv4.1: need to put_layout_hdr on _pnfs_return_layout error path
  NFS: (d)printks should use %zd for ssize_t arguments
  NFSv4.1: fix break condition in pnfs_find_lseg
  nfs4.1: fix several problems with _pnfs_return_layout
  NFSv4.1: allow zero fh array in filelayout decode layout
  NFSv4.1: allow nfs_fhget to succeed with mounted on fileid
  NFSv4.1: Fix a refcounting issue in the pNFS device id cache
  NFSv4.1: deprecate headerpadsz in CREATE_SESSION
  NFS41: do not update isize if inode needs layoutcommit
  NLM: Don't hang forever on NLM unlock requests
  NFS: fix umount of pnfs filesystems

13 years agoalarmtimers: Return -ENOTSUPP if no RTC device is present
John Stultz [Fri, 17 Jun 2011 01:47:37 +0000 (18:47 -0700)]
alarmtimers: Return -ENOTSUPP if no RTC device is present

Toralf Förster and Richard Weinberger noted that if there is
no RTC device, the alarm timers core prints out an annoying
"ALARM timers will not wake from suspend" message.

This warning has been removed in a previous patch, however
the issue still remains:  The original idea was to support
alarm timers even if there was no rtc device, as long as the
system didn't go into suspend.

However, after further consideration, communicating to the application
that alarmtimers are not fully functional seems like the better
solution.

So this patch makes it so we return -ENOTSUPP to any posix _ALARM
clockid calls if there is no backing RTC device on the system.

Further this changes the behavior where when there is no rtc device
we will check for one on clock_getres, clock_gettime, timer_create,
and timer_nsleep instead of on suspend.

CC: Toralf Förster <toralf.foerster@gmx.de>
CC: Richard Weinberger <richard@nod.at
CC: Peter Zijlstra <peterz@infradead.org>
CC: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Reported by: Richard Weinberger <richard@nod.at>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agoalarmtimers: Handle late rtc module loading
John Stultz [Fri, 17 Jun 2011 01:27:09 +0000 (18:27 -0700)]
alarmtimers: Handle late rtc module loading

The alarmtimers code currently picks a rtc device to use at
late init time. However, if your rtc driver is loaded as a module,
it may be registered after the alarmtimers late init code, leaving
the alarmtimers nonfunctional.

This patch moves the the rtcdevice selection to when we actually try
to use it, allowing us to make use of rtc modules that may have been
loaded at any point since bootup.

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Meelis Roos <mroos@ut.ee>
Reported-by: Meelis Roos <mroos@ut.ee>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agoPCI / PM: Block races between runtime PM and system sleep
Rafael J. Wysocki [Tue, 21 Jun 2011 21:47:15 +0000 (23:47 +0200)]
PCI / PM: Block races between runtime PM and system sleep

After commit e8665002477f0278f84f898145b1f141ba26ee26
(PM: Allow pm_runtime_suspend() to succeed during system suspend) it
is possible that a device resumed by the pm_runtime_resume(dev) in
pci_pm_prepare() will be suspended immediately from a work item,
timer function or otherwise, defeating the very purpose of calling
pm_runtime_resume(dev) from there.  To prevent that from happening
it is necessary to increment the runtime PM usage counter of the
device by replacing pm_runtime_resume() with pm_runtime_get_sync().
Moreover, the incremented runtime PM usage counter has to be
decremented by the corresponding pci_pm_complete(), via
pm_runtime_put_sync().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoPM / Domains: Update documentation
Rafael J. Wysocki [Tue, 21 Jun 2011 21:25:32 +0000 (23:25 +0200)]
PM / Domains: Update documentation

Commit 4d27e9dcff00a6425d779b065ec8892e4f391661 (PM: Make power
domain callbacks take precedence over subsystem ones) forgot to
update the device power management documentation to take changes
made by it into account.  Correct that mistake.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
13 years agoPM / Runtime: Handle clocks correctly if CONFIG_PM_RUNTIME is unset
Rafael J. Wysocki [Tue, 21 Jun 2011 21:24:33 +0000 (23:24 +0200)]
PM / Runtime: Handle clocks correctly if CONFIG_PM_RUNTIME is unset

Commit 85eb8c8d0b0900c073b0e6f89979ac9c439ade1a (PM / Runtime:
Generic clock manipulation rountines for runtime PM (v6)) converted
the shmobile platform to using generic code for runtime PM clock
management, but it changed the behavior for CONFIG_PM_RUNTIME unset
incorrectly.

Specifically, for CONFIG_PM_RUNTIME unset pm_runtime_clk_notify()
should enable clocks for action equal to BUS_NOTIFY_BIND_DRIVER and
it should disable them for action equal to BUS_NOTIFY_UNBOUND_DRIVER
(instead of BUS_NOTIFY_ADD_DEVICE and BUS_NOTIFY_DEL_DEVICE,
respectively).  Make this function behave as appropriate.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
13 years agoPM: Fix async resume following suspend failure
Alan Stern [Sat, 18 Jun 2011 20:42:09 +0000 (22:42 +0200)]
PM: Fix async resume following suspend failure

The PM core doesn't handle suspend failures correctly when it comes to
asynchronously suspended devices.  These devices are moved onto the
dpm_suspended_list as soon as the corresponding async thread is
started up, and they remain on the list even if they fail to suspend
or the sleep transition is cancelled before they get suspended.  As a
result, when the PM core unwinds the transition, it tries to resume
the devices even though they were never suspended.

This patch (as1474) fixes the problem by adding a new "is_suspended"
flag to dev_pm_info.  Devices are resumed only if the flag is set.

[rjw:
 * Moved the dev->power.is_suspended check into device_resume(),
   because we need to complete dev->power.completion and clear
   dev->power.is_prepared too for devices whose
   dev->power.is_suspended flags are unset.
 * Fixed __device_suspend() to avoid setting dev->power.is_suspended
   if async_error is different from zero.]

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
13 years agoPM: Free memory bitmaps if opening /dev/snapshot fails
Michal Kubecek [Sat, 18 Jun 2011 18:34:01 +0000 (20:34 +0200)]
PM: Free memory bitmaps if opening /dev/snapshot fails

When opening /dev/snapshot device, snapshot_open() creates memory
bitmaps which are freed in snapshot_release(). But if any of the
callbacks called by pm_notifier_call_chain() returns NOTIFY_BAD, open()
fails, snapshot_release() is never called and bitmaps are not freed.
Next attempt to open /dev/snapshot then triggers BUG_ON() check in
create_basic_memory_bitmaps(). This happens e.g. when vmwatchdog module
is active on s390x.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
13 years agoPM: Rename dev_pm_info.in_suspend to is_prepared
Alan Stern [Sat, 18 Jun 2011 18:22:23 +0000 (20:22 +0200)]
PM: Rename dev_pm_info.in_suspend to is_prepared

This patch (as1473) renames the "in_suspend" field in struct
dev_pm_info to "is_prepared", in preparation for an upcoming change.
The new name is more descriptive of what the field really means.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
13 years agoPM: Update documentation regarding sysdevs
Rafael J. Wysocki [Sat, 18 Jun 2011 17:53:57 +0000 (19:53 +0200)]
PM: Update documentation regarding sysdevs

The part of Documentation/power/devices.txt regarding sysdevs is not
valid any more after commit 2e711c04dbbf7a7732a3f7073b1fc285d12b369d
(PM: Remove sysdev suspend, resume and shutdown operations), so
remove it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
13 years agoPM / Runtime: Update doc: usage count no longer incremented across system PM
Kevin Hilman [Fri, 10 Jun 2011 23:05:51 +0000 (16:05 -0700)]
PM / Runtime: Update doc: usage count no longer incremented across system PM

Commit e8665002477f0278f84f898145b1f141ba26ee26 (PM: Allow
pm_runtime_suspend() to succeed during system suspend) removed usage
count increment across system PM.

Update doc to reflect this.

Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
13 years agoRevert "drm/i915: Kill GTT mappings when moving from GTT domain"
Eric Anholt [Tue, 14 Jun 2011 23:43:09 +0000 (16:43 -0700)]
Revert "drm/i915: Kill GTT mappings when moving from GTT domain"

This reverts commit 4a684a4117abd756291969336af454e8a958802f.
Userland has always been required to set the object's domain to GTT
before using it through a GTT mapping, it's not something that the
kernel is supposed to enforce.  (The pagefault support is so that we
can handle multiple mappings without userland having to pin across
them, not so that userland can use GTT after GPU domains without
telling the kernel).

Fixes 19.2% +/- 0.8% (n=6) performance regression in cairo-gl
firefox-talos-gfx on my T420 latop.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodrm/i915: Apply HWSTAM workaround for BSD ring on SandyBridge
Chris Wilson [Tue, 21 Jun 2011 17:37:59 +0000 (18:37 +0100)]
drm/i915: Apply HWSTAM workaround for BSD ring on SandyBridge

...we need to apply exactly the same workaround for missing interrupts
from BSD as for the BLT ring, apparently.

See also commit 498e720b96379d8ee9c294950a01534a73defcf3
(drm/i915: Fix gen6 (SNB) missed BLT ring interrupts).

Reported-and-tested-by: nkalkhof@web.de
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38529
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodrm/i915: Call intel_enable_plane from i9xx_crtc_mode_set (again)
Keith Packard [Tue, 7 Jun 2011 00:12:49 +0000 (17:12 -0700)]
drm/i915: Call intel_enable_plane from i9xx_crtc_mode_set (again)

This change got placed in the ironlake path instead of the 9xx path
during a recent code shuffle.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Tue, 21 Jun 2011 17:36:06 +0000 (10:36 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/qib: Ensure that LOS and DFE are being turned off
  RDMA/cxgb4: Couple of abort fixes
  RDMA/cxgb4: Don't truncate MR lengths
  RDMA/cxgb4: Don't exceed hw IQ depth limit for user CQs

13 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Tue, 21 Jun 2011 17:22:35 +0000 (10:22 -0700)]
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:
  jbd2: Fix oops in jbd2_journal_remove_journal_head()
  jbd2: Remove obsolete parameters in the comments for some jbd2 functions
  ext4: fixed tracepoints cleanup
  ext4: use FIEMAP_EXTENT_LAST flag for last extent in fiemap
  ext4: Fix max file size and logical block counting of extent format file
  ext4: correct comments for ext4_free_blocks()

13 years agoNFS: Fix decode_secinfo_maxsz
Bryan Schumaker [Thu, 2 Jun 2011 19:07:35 +0000 (15:07 -0400)]
NFS: Fix decode_secinfo_maxsz

I initially did the calculation in bytes, and not words

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSv4.1: Fix an off-by-one error in pnfs_generic_pg_test
Trond Myklebust [Fri, 10 Jun 2011 17:30:23 +0000 (13:30 -0400)]
NFSv4.1: Fix an off-by-one error in pnfs_generic_pg_test

And document what is going on there...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSv4.1: Fix some issues with pnfs_generic_pg_test
Trond Myklebust [Fri, 10 Jun 2011 17:30:22 +0000 (13:30 -0400)]
NFSv4.1: Fix some issues with pnfs_generic_pg_test

1. If the intention is to coalesce requests 'prev' and 'req' then we
   have to ensure at least that we have a layout starting at
   req_offset(prev).

2. If we're only requesting a minimal layout of length desc->pg_count,
   we need to test the length actually returned by the server before
   we allow the coalescing to occur.

3. We need to deal correctly with (pgio->lseg == NULL)

4. Fixup the test guarding the pnfs_update_layout.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoARM: 6969/1: plat-iop: fix build error
Linus Walleij [Mon, 20 Jun 2011 07:13:00 +0000 (08:13 +0100)]
ARM: 6969/1: plat-iop: fix build error

The iop13xx_defconfig didn't build since the platform code uses
defines from <asm/ptrace.h>. Simply add the include so it
compiles.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6961/1: zImage: Add build-time check for correctly-sized proc_type entries
Dave Martin [Tue, 14 Jun 2011 13:20:44 +0000 (14:20 +0100)]
ARM: 6961/1: zImage: Add build-time check for correctly-sized proc_type entries

It is easy to mis-maintain the proc_types table such that the
entries become wrongly-sized and misaligned when the kernel is
built in Thumb-2.

This patch adds an assembly-time check which will turn most common
size/alignment mistakes in this table into build failures, to avoid
having to debug the boot-time kernel hang which would happen if the
resulting kernel were actually booted.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: SMP: wait for CPU to be marked active
Russell King [Mon, 20 Jun 2011 15:46:01 +0000 (16:46 +0100)]
ARM: SMP: wait for CPU to be marked active

When we bring a CPU online, we should wait for it to become active
before entering the idle thread, so we know that the scheduler and
thread migration is going to work.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoALSA: VIA HDA: Create a master amplifier control for VT1718S.
Lydia Wang [Mon, 20 Jun 2011 06:17:56 +0000 (14:17 +0800)]
ALSA: VIA HDA: Create a master amplifier control for VT1718S.

Create a master volume and mute control of playback for VT1718S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: VIA HDA: Mute/unmute mixer conncted to Headphone for VT1718S.
Lydia Wang [Mon, 20 Jun 2011 06:16:33 +0000 (14:16 +0800)]
ALSA: VIA HDA: Mute/unmute mixer conncted to Headphone for VT1718S.

When switch HP independent mode, mute/unmute connctions of mixer  which is
connected to headphone for VT1718S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: VIA HDA: Modify initial verbs list for VT1718S.
Lydia Wang [Mon, 20 Jun 2011 06:14:37 +0000 (14:14 +0800)]
ALSA: VIA HDA: Modify initial verbs list for VT1718S.

Remove some invalid initial verbs and correct some wrong initial verbs
for VT1718S codec.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Remove ALC268 model override for CPR2000
Tony Vroon [Mon, 20 Jun 2011 21:11:11 +0000 (22:11 +0100)]
ALSA: hda - Remove ALC268 model override for CPR2000

The "diverse" Quanta ID 0x0763 is overridden to ALC268_ACER.
This keeps headphone automute and microphone input from operating
on at least one laptop from Opti Systems.
Without the override, the BIOS parser does a fine job setting the
card up and everything works.

Tested-By: Peter Schneider <e.at.chi.kaen@googlemail.com>
Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoLinux 3.0-rc4
Linus Torvalds [Tue, 21 Jun 2011 03:25:46 +0000 (20:25 -0700)]
Linux 3.0-rc4

13 years agovfs: i_state needs to be 'unsigned long' for now
Linus Torvalds [Tue, 21 Jun 2011 03:13:49 +0000 (20:13 -0700)]
vfs: i_state needs to be 'unsigned long' for now

Commit 13e12d14e2dc ("vfs: reorganize 'struct inode' layout a bit")
moved things around a bit changed i_state to be unsigned int instead of
unsigned long.  That was to help structure layout for the 64-bit case,
and shrink 'struct inode' a bit (admittedly that only happened when
spinlock debugging was on and i_flags didn't pack with i_lock).

However, Meelis Roos reports that this results in unaligned exceptions
on sprc, and it turns out that the bit-locking primitives that we use
for the I_NEW bit want to use the bitops.  Which want 'unsigned long',
not 'unsigned int'.

We really should fix the bit locking code to not have that kind of
requirement, but that's a much bigger change.  So for now, revert that
field back to 'unsigned long' (but keep the other re-ordering changes
from the commit that caused this).

Andi points out that we have played games with this in 'struct page', so
it's solvable with other hacks too, but since right now the struct inode
size advantage only happens with some rare config options, it's not
worth fighting.

It _would_ be worth fixing the bitlocking code, though.  Especially
since there is no type safety in the bitlocking code (this never caused
any warnings, and worked fine on x86-64, because the bitlocks take a
'void *' and x86-64 doesn't care that deeply about alignment).  So it's
currently a very easy problem to trigger by mistake and never notice.

Reported-by: Meelis Roos <mroos@linux.ee>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Tue, 21 Jun 2011 03:12:48 +0000 (20:12 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms/r6xx+: voltage fixes
  drm/nouveau: drop leftover debugging
  drm/radeon: avoid warnings from r600/eg irq handlers on powered off card.
  drm/radeon/kms: add missing param for dce3.2 DP transmitter setup
  drm/radeon/kms/atom: fix duallink on some early DCE3.2 cards
  drm/nouveau: fix assumption that semaphore dmaobj is valid in x-chan sync
  drm/nv50/disp: fix gamma with page flipping overlay turned on
  drm/nouveau/pm: Prevent overflow in nouveau_perf_init()
  drm/nouveau: fix big-endian switch

13 years agoMerge branch 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm
Linus Torvalds [Tue, 21 Jun 2011 03:11:34 +0000 (20:11 -0700)]
Merge branch 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm

* 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm:
  msm: timer: Fix DGT rate on 8960 and 8660
  msm: timer: compensate for timer shift in msm_read_timer_count
  msm: timer: Fix SMP build error

13 years agoMerge branch 'for-2.6.40' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Tue, 21 Jun 2011 03:10:52 +0000 (20:10 -0700)]
Merge branch 'for-2.6.40' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.40' of git://linux-nfs.org/~bfields/linux:
  nfsd4: fix break_lease flags on nfsd open
  nfsd: link returns nfserr_delay when breaking lease
  nfsd: v4 support requires CRYPTO
  nfsd: fix dependency of nfsd on auth_rpcgss

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 21 Jun 2011 03:10:18 +0000 (20:10 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
  pxa168_eth: fix race in transmit path.
  ipv4, ping: Remove duplicate icmp.h include
  netxen: fix race in skb->len access
  sgi-xp: fix a use after free
  hp100: fix an skb->len race
  netpoll: copy dev name of slaves to struct netpoll
  ipv4: fix multicast losses
  r8169: fix static initializers.
  inet_diag: fix inet_diag_bc_audit()
  gigaset: call module_put before restart of if_open()
  farsync: add module_put to error path in fst_open()
  net: rfs: enable RFS before first data packet is received
  fs_enet: fix freescale FCC ethernet dp buffer alignment
  netdev: bfin_mac: fix memory leak when freeing dma descriptors
  vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support
  caif: Bugfix - XOFF removed channel from caif-mux
  tun: teach the tun/tap driver to support netpoll
  dp83640: drop PHY status frames in the driver.
  dp83640: fix phy status frame event parsing
  phylib: Allow BCM63XX PHY to be selected only on BCM63XX.
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Tue, 21 Jun 2011 03:09:15 +0000 (20:09 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  devcgroup_inode_permission: take "is it a device node" checks to inlined wrapper
  fix comment in generic_permission()
  kill obsolete comment for follow_down()
  proc_sys_permission() is OK in RCU mode
  reiserfs_permission() doesn't need to bail out in RCU mode
  proc_fd_permission() is doesn't need to bail out in RCU mode
  nilfs2_permission() doesn't need to bail out in RCU mode
  logfs doesn't need ->permission() at all
  coda_ioctl_permission() is safe in RCU mode
  cifs_permission() doesn't need to bail out in RCU mode
  bad_inode_permission() is safe from RCU mode
  ubifs: dereferencing an ERR_PTR in ubifs_mount()

13 years agodrm/radeon/kms/r6xx+: voltage fixes
Alex Deucher [Mon, 20 Jun 2011 17:00:31 +0000 (13:00 -0400)]
drm/radeon/kms/r6xx+: voltage fixes

0xff01 is not an actual voltage value, but a flag
for the driver.  If the power state as that value,
skip setting the voltage.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomsm: timer: Fix DGT rate on 8960 and 8660
Stephen Boyd [Thu, 21 Apr 2011 23:09:11 +0000 (23:09 +0000)]
msm: timer: Fix DGT rate on 8960 and 8660

The DGT runs at 27 MHz divided by 4 on 8660 and 8960.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
13 years agojfs: agstart field must be 64 bits
Dave Kleikamp [Mon, 20 Jun 2011 22:53:24 +0000 (17:53 -0500)]
jfs: agstart field must be 64 bits

The previous patch added the agstart field to jfs_ip, but declared
it a long.  We need to make sure its 64 bits on every platform.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agopxa168_eth: fix race in transmit path.
Richard Cochran [Sun, 19 Jun 2011 21:48:06 +0000 (21:48 +0000)]
pxa168_eth: fix race in transmit path.

Because the socket buffer is freed in the completion interrupt, it is not
safe to access it after submitting it to the hardware.

Cc: stable@kernel.org
Cc: Sachin Sanap <ssanap@marvell.com>
Cc: Zhangfei Gao <zgao6@marvell.com>
Cc: Philip Rakity <prakity@marvell.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoNFSv4.1: file layout must consider pg_bsize for coalescing
Benny Halevy [Sun, 19 Jun 2011 22:33:46 +0000 (18:33 -0400)]
NFSv4.1: file layout must consider pg_bsize for coalescing

Otherwise we end up overflowing the rpc buffer size on the receive end.

Signed-off-by: Benny Halevy <benny@tonian.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoipv4, ping: Remove duplicate icmp.h include
Jesper Juhl [Sun, 19 Jun 2011 22:31:20 +0000 (22:31 +0000)]
ipv4, ping: Remove duplicate icmp.h include

Remove the duplicate inclusion of net/icmp.h from net/ipv4/ping.c

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetxen: fix race in skb->len access
Eric Dumazet [Sun, 19 Jun 2011 20:26:15 +0000 (20:26 +0000)]
netxen: fix race in skb->len access

As soon as skb is given to hardware, TX completion can free skb under
us.
Therefore, we should update dev stats before kicking the device.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 20 Jun 2011 16:01:33 +0000 (09:01 -0700)]
Merge branch 'stable/bug.fixes' of git://git./linux/kernel/git/konrad/xen

* 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/setup: Fix for incorrect xen_extra_mem_start.
  xen: When calling power_off, don't call the halt function.
  xen: Fix compile warning when CONFIG_SMP is not defined.
  xen: support CONFIG_MAXSMP
  xen: partially revert "xen: set max_pfn_mapped to the last pfn mapped"

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Mon, 20 Jun 2011 15:59:46 +0000 (08:59 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: sh_keysc - 8x8 MODE_6 fix
  Input: omap-keypad - add missing input_sync()
  Input: evdev - try to wake up readers only if we have full packet
  Input: properly assign return value of clamp() macro.

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
Linus Torvalds [Mon, 20 Jun 2011 15:58:53 +0000 (08:58 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/btrfs-unstable

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: avoid delayed metadata items during commits
  btrfs: fix uninitialized return value
  btrfs: fix wrong reservation when doing delayed inode operations
  btrfs: Remove unused sysfs code
  btrfs: fix dereference of ERR_PTR value
  Btrfs: fix relocation races
  Btrfs: set no_trans_join after trying to expand the transaction
  Btrfs: protect the pending_snapshots list with trans_lock
  Btrfs: fix path leakage on subvol deletion
  Btrfs: drop the delalloc_bytes check in shrink_delalloc
  Btrfs: check the return value from set_anon_super

13 years agoMerge branch 'kvm-updates/3.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Mon, 20 Jun 2011 15:58:07 +0000 (08:58 -0700)]
Merge branch 'kvm-updates/3.0' of git://git./virt/kvm/kvm

* 'kvm-updates/3.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: Fix register corruption in pvclock_scale_delta
  KVM: MMU: fix opposite condition in mapping_level_dirty_bitmap
  KVM: VMX: do not overwrite uptodate vcpu->arch.cr3 on KVM_SET_SREGS
  KVM: MMU: Fix build warnings in walk_addr_generic()

13 years agoJFS: Don't save agno in the inode
Dave Kleikamp [Mon, 20 Jun 2011 15:53:46 +0000 (10:53 -0500)]
JFS: Don't save agno in the inode

Resizing the file system can result in an in-memory inode being remapped
to a different aggregate group (AG). A cached AG number can cause
problems when trying to free or allocate inodes. Instead, save the IAG's
agstart address and calculate the agno when we need it.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agojfs: Update agstart when resizing volume
Dave Kleikamp [Mon, 20 Jun 2011 15:32:46 +0000 (10:32 -0500)]
jfs: Update agstart when resizing volume

A comment indicates that the IAG's agstart does not need to be updated
since it will always point to a block in the same aggregate group, but
jfs_fsck isn't so forgiving and reports it as an error.

I'm fixing this in jfsutils as well, so either a new kernel or new
utilities will be sufficient to fix the problem.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agojfs: old_agsize should be 64 bits in jfs_extendfs
Dave Kleikamp [Mon, 20 Jun 2011 15:30:04 +0000 (10:30 -0500)]
jfs: old_agsize should be 64 bits in jfs_extendfs

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agodevcgroup_inode_permission: take "is it a device node" checks to inlined wrapper
Al Viro [Sun, 19 Jun 2011 17:01:04 +0000 (13:01 -0400)]
devcgroup_inode_permission: take "is it a device node" checks to inlined wrapper

inode_permission() calls devcgroup_inode_permission() and almost all such
calls are _not_ for device nodes; let's at least keep the common path
straight...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofix comment in generic_permission()
Al Viro [Sun, 19 Jun 2011 05:56:53 +0000 (01:56 -0400)]
fix comment in generic_permission()

CAP_DAC_OVERRIDE is enough for MAY_EXEC on directory, even if
no exec bits are set.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agokill obsolete comment for follow_down()
Al Viro [Fri, 17 Jun 2011 23:20:48 +0000 (19:20 -0400)]
kill obsolete comment for follow_down()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoproc_sys_permission() is OK in RCU mode
Al Viro [Sun, 19 Jun 2011 00:42:00 +0000 (20:42 -0400)]
proc_sys_permission() is OK in RCU mode

nothing blocking there, since all instances of sysctl
->permissions() method are non-blocking - both of them,
that is.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoreiserfs_permission() doesn't need to bail out in RCU mode
Al Viro [Sun, 19 Jun 2011 00:37:33 +0000 (20:37 -0400)]
reiserfs_permission() doesn't need to bail out in RCU mode

nothing blocking other than generic_permission() (and
check_acl callback does bail out in RCU mode).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoproc_fd_permission() is doesn't need to bail out in RCU mode
Al Viro [Sun, 19 Jun 2011 00:35:23 +0000 (20:35 -0400)]
proc_fd_permission() is doesn't need to bail out in RCU mode

nothing blocking except generic_permission()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonilfs2_permission() doesn't need to bail out in RCU mode
Al Viro [Sun, 19 Jun 2011 00:21:44 +0000 (20:21 -0400)]
nilfs2_permission() doesn't need to bail out in RCU mode

Nothing blocking except for generic_permission().  Which will DTRT.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agologfs doesn't need ->permission() at all
Al Viro [Sun, 19 Jun 2011 00:17:22 +0000 (20:17 -0400)]
logfs doesn't need ->permission() at all

... and never did, what with its ->permission() being what we do by default
when ->permission is NULL...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agocoda_ioctl_permission() is safe in RCU mode
Al Viro [Sun, 19 Jun 2011 00:11:43 +0000 (20:11 -0400)]
coda_ioctl_permission() is safe in RCU mode

return (mask & MAY_EXEC) ? -EACCES : 0; is non-blocking...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agocifs_permission() doesn't need to bail out in RCU mode
Al Viro [Sun, 19 Jun 2011 00:03:36 +0000 (20:03 -0400)]
cifs_permission() doesn't need to bail out in RCU mode

nothing potentially blocking except generic_permission(), which
will DTRT

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agobad_inode_permission() is safe from RCU mode
Al Viro [Sat, 18 Jun 2011 23:59:04 +0000 (19:59 -0400)]
bad_inode_permission() is safe from RCU mode

return -EIO; is *not* a blocking operation, thank you very much.
Nick, what the hell have you been smoking?

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoubifs: dereferencing an ERR_PTR in ubifs_mount()
Dan Carpenter [Mon, 20 Jun 2011 07:10:24 +0000 (10:10 +0300)]
ubifs: dereferencing an ERR_PTR in ubifs_mount()

d251ed271d5 "ubifs: fix sget races" left out the goto from this
error path so the static checkers complain that we're dereferencing
"sb" when it's an ERR_PTR.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonfsd4: fix break_lease flags on nfsd open
J. Bruce Fields [Tue, 7 Jun 2011 15:50:23 +0000 (11:50 -0400)]
nfsd4: fix break_lease flags on nfsd open

Thanks to Casey Bodley for pointing out that on a read open we pass 0,
instead of O_RDONLY, to break_lease, with the result that a read open is
treated like a write open for the purposes of lease breaking!

Reported-by: Casey Bodley <cbodley@citi.umich.edu>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
13 years agoALSA: HDA: Remove quirk for an HP device
David Henningsson [Mon, 20 Jun 2011 08:27:07 +0000 (10:27 +0200)]
ALSA: HDA: Remove quirk for an HP device

The reporter, who is running kernel 2.6.38, reports that
he needs to set model=auto for the headphone output to work
correctly.

BugLink: http://bugs.launchpad.net/bugs/761022
Cc: stable@kernel.org (v2.6.38+)
Reported-by: Jo
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoblock: add REQ_SECURE to REQ_COMMON_MASK
Namhyung Kim [Mon, 20 Jun 2011 11:23:14 +0000 (13:23 +0200)]
block: add REQ_SECURE to REQ_COMMON_MASK

Add REQ_SECURE flag to REQ_COMMON_MASK so that
init_request_from_bio() can pass it to @req->cmd_flags.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@kernel.org # 2.6.36 and newer
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agodrm/nouveau: drop leftover debugging
Dave Airlie [Mon, 20 Jun 2011 05:25:35 +0000 (15:25 +1000)]
drm/nouveau: drop leftover debugging

this printk isn't really useful, just drop it for now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Mon, 20 Jun 2011 02:02:38 +0000 (12:02 +1000)]
Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes

* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: fix assumption that semaphore dmaobj is valid in x-chan sync
  drm/nv50/disp: fix gamma with page flipping overlay turned on
  drm/nouveau/pm: Prevent overflow in nouveau_perf_init()
  drm/nouveau: fix big-endian switch

13 years agodrm/radeon: avoid warnings from r600/eg irq handlers on powered off card.
Dave Airlie [Sat, 18 Jun 2011 03:59:51 +0000 (03:59 +0000)]
drm/radeon: avoid warnings from r600/eg irq handlers on powered off card.

Since we were calling the wptr function before checking if the IH was
even enabled, or the GPU wasn't shutdown, we'd get spam in the logs when
the GPU readback 0xffffffff. This reorders things so we return early
in the no IH and GPU shutdown cases.

Reported-and-tested-by: ManDay on #radeon
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add missing param for dce3.2 DP transmitter setup
Alex Deucher [Fri, 17 Jun 2011 06:11:30 +0000 (06:11 +0000)]
drm/radeon/kms: add missing param for dce3.2 DP transmitter setup

This is used during phy init to set up the phy for DP.  This may
fix DP problems on DCE3.2 cards.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms/atom: fix duallink on some early DCE3.2 cards
Alex Deucher [Fri, 17 Jun 2011 17:13:52 +0000 (13:13 -0400)]
drm/radeon/kms/atom: fix duallink on some early DCE3.2 cards

Certain revisions of the vbios on DCE3.2 cards have a bug
in the transmitter control table which prevents duallink from
being enabled properly on some cards.  The action switch statement
jumps to the wrong offset for the OUTPUT_ENABLE action.  The fix
is to use the ENABLE action rather than the OUTPUT_ENABLE action
on the affected cards.  In fixed version of the vbios, both
actions jump to the same offset, so the change should be safe.

Reported-and-tested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agosgi-xp: fix a use after free
Eric Dumazet [Sun, 19 Jun 2011 12:52:36 +0000 (12:52 +0000)]
sgi-xp: fix a use after free

Its illegal to dereference skb after dev_kfree_skb(skb)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Robin Holt <holt@sgi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agohp100: fix an skb->len race
Eric Dumazet [Sun, 19 Jun 2011 12:43:33 +0000 (12:43 +0000)]
hp100: fix an skb->len race

As soon as skb is given to hardware and spinlock released, TX completion
can free skb under us. Therefore, we should update netdev stats before
spinlock release.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'davem.r8169' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu...
David S. Miller [Sun, 19 Jun 2011 23:26:46 +0000 (16:26 -0700)]
Merge branch 'davem.r8169' of git://git./linux/kernel/git/romieu/netdev-2.6

13 years agonetpoll: copy dev name of slaves to struct netpoll
WANG Cong [Sun, 19 Jun 2011 23:13:01 +0000 (16:13 -0700)]
netpoll: copy dev name of slaves to struct netpoll

Otherwise we will not see the name of the slave dev in error
message:

[  388.469446] (null):  doesn't support polling, aborting.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopnfs-obj: No longer needed to take an extra ref at add_device
Boaz Harrosh [Fri, 17 Jun 2011 20:25:51 +0000 (16:25 -0400)]
pnfs-obj: No longer needed to take an extra ref at add_device

Andy's last device_cache patches, already take an extra
reference on the newly inserted device_id. So we can remove it
from obj-io.

Without this patch the device_ids are leaked.

Andy's patches are not in Linus tree yet. So I'm not sure if they are
scheduled for this Kernel or the next. This patch should be added as
part of these.

CC: Andy Adamson <andros@netapp.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoKVM: Fix register corruption in pvclock_scale_delta
Zachary Amsden [Thu, 16 Jun 2011 03:50:04 +0000 (20:50 -0700)]
KVM: Fix register corruption in pvclock_scale_delta

The 128-bit multiply in pvclock.h was missing an output constraint for
EDX which caused a register corruption to appear.  Thanks to Ulrich for
diagnosing the EDX corruption and Avi for providing this fix.

Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoKVM: MMU: fix opposite condition in mapping_level_dirty_bitmap
Steve [Fri, 17 Jun 2011 02:25:39 +0000 (10:25 +0800)]
KVM: MMU: fix opposite condition in mapping_level_dirty_bitmap

The condition is opposite, it always maps huge page for the dirty tracked page

Reported-by: Steve <stefan.bosak@gmail.com>
Signed-off-by: Steve <stefan.bosak@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoKVM: VMX: do not overwrite uptodate vcpu->arch.cr3 on KVM_SET_SREGS
Marcelo Tosatti [Mon, 6 Jun 2011 17:27:47 +0000 (14:27 -0300)]
KVM: VMX: do not overwrite uptodate vcpu->arch.cr3 on KVM_SET_SREGS

Only decache guest CR3 value if vcpu->arch.cr3 is stale.
Fixes loadvm with live guest.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Tested-by: Markus Schade <markus.schade@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoKVM: MMU: Fix build warnings in walk_addr_generic()
Borislav Petkov [Mon, 30 May 2011 20:11:17 +0000 (22:11 +0200)]
KVM: MMU: Fix build warnings in walk_addr_generic()

On 3.0-rc1 I get

In file included from arch/x86/kvm/mmu.c:2856:
arch/x86/kvm/paging_tmpl.h: In function ‘paging32_walk_addr_generic’:
arch/x86/kvm/paging_tmpl.h:124: warning: ‘ptep_user’ may be used uninitialized in this function
In file included from arch/x86/kvm/mmu.c:2852:
arch/x86/kvm/paging_tmpl.h: In function ‘paging64_walk_addr_generic’:
arch/x86/kvm/paging_tmpl.h:124: warning: ‘ptep_user’ may be used uninitialized in this function

caused by 6e2ca7d1802bf8ed9908435e34daa116662e7790. According to Takuya
Yoshikawa, ptep_user won't be used uninitialized so shut up gcc.

Cc: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Link: http://lkml.kernel.org/r/20110530094604.GC21833@liondog.tnic
Signed-off-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoMerge branches 'perf-urgent-for-linus', 'sched-urgent-for-linus', 'timers-urgent...
Linus Torvalds [Sun, 19 Jun 2011 16:00:18 +0000 (09:00 -0700)]
Merge branches 'perf-urgent-for-linus', 'sched-urgent-for-linus', 'timers-urgent-for-linus' and 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tools/perf: Fix static build of perf tool
  tracing: Fix regression in printk_formats file

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  generic-ipi: Fix kexec boot crash by initializing call_single_queue before enabling interrupts

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  clocksource: Make watchdog robust vs. interruption
  timerfd: Fix wakeup of processes when timer is cancelled on clock change

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, MAINTAINERS: Add x86 MCE people
  x86, efi: Do not reserve boot services regions within reserved areas

13 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 19 Jun 2011 15:56:56 +0000 (08:56 -0700)]
Merge branch 'core-urgent-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rcu: Move RCU_BOOST #ifdefs to header file
  rcu: use softirq instead of kthreads except when RCU_BOOST=y
  rcu: Use softirq to address performance regression
  rcu: Simplify curing of load woes

13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sun, 19 Jun 2011 03:33:31 +0000 (20:33 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (s3c) Initialize sysfs attributes
  hwmon: (ibmpex) Initialize sysfs attributes
  hwmon: (ibmaem) Initialize sysfs attributes
  hwmon: (asus_atk0110) Consolidate sysfs attribute initialization
  hwmon: (coretemp) Drop unused struct members

13 years agommc: Add PCI fixup quirks for Ricoh 1180:e823 reader
Manoj Iyer [Thu, 26 May 2011 16:19:05 +0000 (11:19 -0500)]
mmc: Add PCI fixup quirks for Ricoh 1180:e823 reader

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
13 years agommc: sdhi: fix module unloading
Guennadi Liakhovetski [Fri, 27 May 2011 14:54:05 +0000 (16:54 +0200)]
mmc: sdhi: fix module unloading

MMC host drivers must be able to process interrupts during
mmc_remove_host().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
13 years agommc: of_mmc_spi: add NO_IRQ define to of_mmc_spi.c
Wanlong Gao [Tue, 24 May 2011 13:03:22 +0000 (21:03 +0800)]
mmc: of_mmc_spi: add NO_IRQ define to of_mmc_spi.c

Provide a dummy value of NO_IRQ for architectures that don't support
it (such as MIPS).  Fixes the build error for MIPS.

Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Chris Ball <cjb@laptop.org>
13 years agommc: vub300: fix null dereferences in error handling
Chris Ball [Fri, 27 May 2011 03:15:49 +0000 (23:15 -0400)]
mmc: vub300: fix null dereferences in error handling

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
13 years agox86, MAINTAINERS: Add x86 MCE people
Ingo Molnar [Sat, 18 Jun 2011 20:51:13 +0000 (22:51 +0200)]
x86, MAINTAINERS: Add x86 MCE people

Announce the new x86 MCE infrastructure maintainers.

Acked-by: Borislav Petkov <bp@amd64.org>
Acked-by: Tony Luck <tony.luck@intel.com>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/n/tip-8hs7yob6wib4vblmrmbpbav4@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86, efi: Do not reserve boot services regions within reserved areas
Maarten Lankhorst [Tue, 14 Jun 2011 17:53:09 +0000 (19:53 +0200)]
x86, efi: Do not reserve boot services regions within reserved areas

Commit 916f676f8dc started reserving boot service code since some systems
require you to keep that code around until SetVirtualAddressMap is called.

However, in some cases those areas will overlap with reserved regions.
The proper medium-term fix is to fix the bootloader to prevent the
conflicts from occurring by moving the kernel to a better position,
but the kernel should check for this possibility, and only reserve regions
which can be reserved.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Link: http://lkml.kernel.org/r/4DF7A005.1050407@gmail.com
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoipv4: fix multicast losses
Eric Dumazet [Sat, 18 Jun 2011 18:59:18 +0000 (11:59 -0700)]
ipv4: fix multicast losses

Knut Tidemann found that first packet of a multicast flow was not
correctly received, and bisected the regression to commit b23dd4fe42b4
(Make output route lookup return rtable directly.)

Special thanks to Knut, who provided a very nice bug report, including
sample programs to demonstrate the bug.

Reported-and-bisectedby: Knut Tidemann <knut.andre.tidemann@jotron.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisofs: fix bh leak in isofs_fill_super() error case
Linus Torvalds [Wed, 8 Jun 2011 17:30:03 +0000 (10:30 -0700)]
isofs: fix bh leak in isofs_fill_super() error case

In isofs_fill_super(), when an iso_primary_descriptor is found, it is
kept in pri_bh.  The error cases don't properly release it.  Fix it.

Reported-and-tested-by: 김원석 <stanley.will.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoInput: sh_keysc - 8x8 MODE_6 fix
Magnus Damm [Sat, 18 Jun 2011 09:51:52 +0000 (02:51 -0700)]
Input: sh_keysc - 8x8 MODE_6 fix

According to the data sheet for G4, AP4 and AG5 KEYSC MODE_6 is 8x8 keys.
Bump up MAXKEYS to 64 too.

Signed-off-by: Magnus Damm <damm@opensource.se>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: omap-keypad - add missing input_sync()
Janusz Krzysztofik [Thu, 16 Jun 2011 04:13:55 +0000 (21:13 -0700)]
Input: omap-keypad - add missing input_sync()

Otherwise the updated evdev driver (commit cdda911c34006f1089f3c87b1a1f,
"Input: evdev - only signal polls on full packets") no longer works on
top of omap-keypad.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>