pandora-kernel.git
12 years agonfsd4: move principal name into svc_cred
J. Bruce Fields [Mon, 14 May 2012 23:55:22 +0000 (19:55 -0400)]
nfsd4: move principal name into svc_cred

Instead of keeping the principal name associated with a request in a
structure that's private to auth_gss and using an accessor function,
move it to svc_cred.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: allow removing clients not holding state
J. Bruce Fields [Mon, 14 May 2012 19:57:23 +0000 (15:57 -0400)]
nfsd4: allow removing clients not holding state

RFC 5661 actually says we should allow an exchange_id to remove a
matching client, even if the exchange_id comes from a different
principal, *if* the victim client lacks any state.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: rearrange exchange_id logic to simplify
J. Bruce Fields [Sun, 13 May 2012 00:37:23 +0000 (20:37 -0400)]
nfsd4: rearrange exchange_id logic to simplify

Minor cleanup: it's simpler to have separate code paths for the update
and non-update cases.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: exchange_id cleanup: comments
J. Bruce Fields [Mon, 14 May 2012 13:47:11 +0000 (09:47 -0400)]
nfsd4: exchange_id cleanup: comments

Make these comments a bit more concise and uniform.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: exchange_id cleanup: local shorthands for repeated tests
J. Bruce Fields [Mon, 14 May 2012 13:08:10 +0000 (09:08 -0400)]
nfsd4: exchange_id cleanup: local shorthands for repeated tests

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: allow an EXCHANGE_ID to kill a 4.0 client
J. Bruce Fields [Sun, 13 May 2012 01:32:30 +0000 (21:32 -0400)]
nfsd4: allow an EXCHANGE_ID to kill a 4.0 client

Following rfc 5661 section 2.4.1, we can permit a 4.1 client to remove
an established 4.0 client's state.

(But we don't allow updates.)

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: exchange_id: check creds before killing confirmed client
J. Bruce Fields [Sun, 13 May 2012 01:08:41 +0000 (21:08 -0400)]
nfsd4: exchange_id: check creds before killing confirmed client

We mustn't allow a client to destroy another client with established
state unless it has the right credential.

And some minor cleanup.

(Note: our comparison of credentials is actually pretty bogus currently;
that will need to be fixed in another patch.)

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: exchange_id error cleanup
J. Bruce Fields [Sun, 13 May 2012 00:53:20 +0000 (20:53 -0400)]
nfsd4: exchange_id error cleanup

There's no point to the dprintk here as the main proc_compound loop
already does this.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: exchange_id has a pointless copy
J. Bruce Fields [Fri, 4 May 2012 19:16:06 +0000 (15:16 -0400)]
nfsd4: exchange_id has a pointless copy

We just verified above that these two verifiers are already the same.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agosvcrpc: fix a comment typo
J. Bruce Fields [Wed, 16 May 2012 21:14:14 +0000 (17:14 -0400)]
svcrpc: fix a comment typo

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd: return 0 on reads of fault injection files
Weston Andros Adamson [Thu, 10 May 2012 19:31:10 +0000 (15:31 -0400)]
nfsd: return 0 on reads of fault injection files

debugfs read operations were returning the contents of an uninitialized u64.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd: wrap all accesses to st_deny_bmap
Jeff Layton [Fri, 11 May 2012 13:45:14 +0000 (09:45 -0400)]
nfsd: wrap all accesses to st_deny_bmap

Handle the st_deny_bmap in a similar fashion to the st_access_bmap. Add
accessor functions and use those instead of bare bitops.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd: wrap accesses to st_access_bmap
Jeff Layton [Fri, 11 May 2012 13:45:13 +0000 (09:45 -0400)]
nfsd: wrap accesses to st_access_bmap

Currently, we do this for the most part with "bare" bitops, but
eventually we'll need to expand the share mode code to handle access
and deny modes on other nodes.

In order to facilitate that code in the future, move to some generic
accessor functions. For now, these are mostly static inlines, but
eventually we'll want to move these to "real" functions that are
able to handle multi-node configurations or have a way to "swap in"
new operations to be done in lieu of or in conjunction with these
atomic bitops.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd: make test_share a bool return
Jeff Layton [Fri, 11 May 2012 13:45:12 +0000 (09:45 -0400)]
nfsd: make test_share a bool return

All of the callers treat the return that way already.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd: consolidate set_access and set_deny
Jeff Layton [Fri, 11 May 2012 13:45:11 +0000 (09:45 -0400)]
nfsd: consolidate set_access and set_deny

These functions are identical. Also, rename them to bmap_to_share_mode
to better reflect what they do, and have them just return the result
instead of passing in a pointer to the storage location.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoNFSD: SETCLIENTID_CONFIRM returns NFS4ERR_CLID_INUSE too often
Chuck Lever [Tue, 15 May 2012 21:42:08 +0000 (17:42 -0400)]
NFSD: SETCLIENTID_CONFIRM returns NFS4ERR_CLID_INUSE too often

According to RFC 3530bis, the only items SETCLIENTID_CONFIRM processing
should be concerned with is the clientid, clientid verifier, and
principal.  The client's IP address is not supposed to be interesting.

And, NFS4ERR_CLID_INUSE is meant only for principal mismatches.

I triggered this logic with a prototype UCS client -- one that
uses the same nfs_client_id4 string for all servers.  The client
mounted our server via its IPv4, then via its IPv6 address.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoLockD: add debug message to start and stop functions
Stanislav Kinsbursky [Wed, 25 Apr 2012 14:23:16 +0000 (18:23 +0400)]
LockD: add debug message to start and stop functions

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoLockD: service start function introduced
Stanislav Kinsbursky [Wed, 25 Apr 2012 14:23:09 +0000 (18:23 +0400)]
LockD: service start function introduced

This is just a code move, which from my POV makes the code look better.
I.e. now on start we have 3 different stages:
1) Service creation.
2) Service per-net data allocation.
3) Service start.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoLockD: move global usage counter manipulation from error path
Stanislav Kinsbursky [Wed, 25 Apr 2012 14:23:02 +0000 (18:23 +0400)]
LockD: move global usage counter manipulation from error path

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoLockD: service creation function introduced
Stanislav Kinsbursky [Wed, 25 Apr 2012 14:22:54 +0000 (18:22 +0400)]
LockD: service creation function introduced

This function creates service if it doesn't exist, or increases usage
counter if it does, and returns a pointer to it.  The usage counter will
be droppepd by svc_destroy() later in lockd_up().

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoLockD: use existing per-net data function on service creation
Stanislav Kinsbursky [Wed, 25 Apr 2012 14:22:47 +0000 (18:22 +0400)]
LockD: use existing per-net data function on service creation

This patch also replaces svc_rpcb_setup() with svc_bind().

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoLockD: pass service to per-net up and down functions
Stanislav Kinsbursky [Wed, 25 Apr 2012 14:22:40 +0000 (18:22 +0400)]
LockD: pass service to per-net up and down functions

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agosunrpc: do array overrun check in svc_recv before allocating pages
Jeff Layton [Fri, 4 May 2012 15:44:12 +0000 (11:44 -0400)]
sunrpc: do array overrun check in svc_recv before allocating pages

There's little point in waiting until after we allocate all of the pages
to see if we're going to overrun the array. In the event that this
calculation is really off we could end up scribbling over a bunch of
memory and make it tougher to debug.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoSUNRPC: move per-net operations from svc_destroy()
Stanislav Kinsbursky [Fri, 4 May 2012 08:49:41 +0000 (12:49 +0400)]
SUNRPC: move per-net operations from svc_destroy()

The idea is to separate service destruction and per-net operations,
because these are two different things and the mix looks ugly.

Notes:

1) For NFS server this patch looks ugly (sorry for that). But these
place will be rewritten soon during NFSd containerization.

2) LockD per-net counter increase int lockd_up() was moved prior to
make_socks() to make lockd_down_net() call safe in case of error.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoSUNRPC: new svc_bind() routine introduced
Stanislav Kinsbursky [Wed, 2 May 2012 12:08:38 +0000 (16:08 +0400)]
SUNRPC: new svc_bind() routine introduced

This new routine is responsible for service registration in a specified
network context.

The idea is to separate service creation from per-net operations.

Note also: since registering service with svc_bind() can fail, the
service will be destroyed and during destruction it will try to
unregister itself from rpcbind. In this case unregistration has to be
skipped.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agorpc: handle rotated gss data for Windows interoperability
J. Bruce Fields [Thu, 12 Apr 2012 00:08:45 +0000 (20:08 -0400)]
rpc: handle rotated gss data for Windows interoperability

The data in Kerberos gss tokens can be rotated.  But we were lazy and
rejected any nonzero rotation value.  It wasn't necessary for the
implementations we were testing against at the time.

But it appears that Windows does use a nonzero value here.

So, implement rotation to bring ourselves into compliance with the spec
and to interoperate with Windows.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd: add IPv6 addr escaping to fs_location hosts
Weston Andros Adamson [Tue, 24 Apr 2012 15:07:59 +0000 (11:07 -0400)]
nfsd: add IPv6 addr escaping to fs_location hosts

The fs_location->hosts list is split on colons, but this doesn't work when
IPv6 addresses are used (they contain colons).
This patch adds the function nfsd4_encode_components_esc() to
allow the caller to specify escape characters when splitting on 'sep'.
In order to fix referrals, this patch must be used with the mountd patch
that similarly fixes IPv6 [] escaping.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: fix change attribute endianness
J. Bruce Fields [Wed, 25 Apr 2012 22:11:04 +0000 (18:11 -0400)]
nfsd4: fix change attribute endianness

Though actually this doesn't matter much, as NFSv4.0 clients are
required to treat the change attribute as opaque.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: fix free_stateid return endianness
J. Bruce Fields [Wed, 25 Apr 2012 22:04:54 +0000 (18:04 -0400)]
nfsd4: fix free_stateid return endianness

Cc: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: int/__be32 fixes
J. Bruce Fields [Wed, 25 Apr 2012 21:58:50 +0000 (17:58 -0400)]
nfsd4: int/__be32 fixes

In each of these cases there's a simple unambiguous correct choice, and
no actual bug.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: preserve __user annotation on cld downcall msg
J. Bruce Fields [Wed, 25 Apr 2012 20:58:05 +0000 (16:58 -0400)]
nfsd4: preserve __user annotation on cld downcall msg

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd4: fix missing "static"
J. Bruce Fields [Wed, 25 Apr 2012 20:56:22 +0000 (16:56 -0400)]
nfsd4: fix missing "static"

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agonfsd: state.c should include current_stateid.h
J. Bruce Fields [Wed, 25 Apr 2012 20:49:18 +0000 (16:49 -0400)]
nfsd: state.c should include current_stateid.h

OK, admittedly I'm mainly just trying to shut sparse up.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
12 years agoMerge tag 'for-v3.5' of git://git.infradead.org/battery-2.6
Linus Torvalds [Thu, 31 May 2012 19:10:15 +0000 (12:10 -0700)]
Merge tag 'for-v3.5' of git://git.infradead.org/battery-2.6

Pull battery updates from Anton Vorontsov:
 "A bunch of fixes for v3.5, nothing extraordinary."

* tag 'for-v3.5' of git://git.infradead.org/battery-2.6: (27 commits)
  smb347-charger: Include missing <linux/err.h>
  smb347-charger: Clean up battery attributes
  max17042_battery: Add support for max17047/50 chip
  sbs-battery.c: Capacity attr = remaining relative capacity
  isp1704_charger: Use after free on probe error
  ds2781_battery: Use DS2781_PARAM_EEPROM_SIZE and DS2781_USER_EEPROM_SIZE
  power_supply: Fix a typo in BATTERY_DS2781 Kconfig entry
  charger-manager: Provide cm_notify_event function for in-kernel use
  charger-manager: Poll battery health in normal state
  smb347-charger: Convert to regmap API
  smb347-charger: Move IRQ enabling to the end of probe
  smb347-charger: Rename few functions to match better what they are doing
  smb347-charger: Convert to use module_i2c_driver()
  smb347_charger: Cleanup power supply registration code in probe
  ab8500: Clean up probe routines
  ab8500_fg: Harden platform data check
  ab8500_btemp: Harden platform data check
  ab8500_charger: Harden platform data check
  MAINTAINERS: Fix 'F' entry for the power supply class
  max17042_battery: Handle irq request failure case
  ...

12 years agoMerge git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Thu, 31 May 2012 19:09:07 +0000 (12:09 -0700)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull two small kvm fixes from Avi Kivity:
 "A build fix for non-kvm archs and a transparent hugepage refcount
  bugfix on hosts with 4M pages."

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: Export asm-generic/kvm_para.h
  KVM: MMU: fix huge page adapted on non-PAE host

12 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Thu, 31 May 2012 19:02:41 +0000 (12:02 -0700)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull final round of SCSI updates from James Bottomley:
 "This is primarily another round of driver updates (bnx2fc, qla2xxx,
  qla4xxx) including the target mode driver for qla2xxx.  We've also got
  a couple of regression fixes (async scanning, broken this merge window
  and a fix to a long standing break in the scsi_wait_scan module)."

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (45 commits)
  [SCSI] fix scsi_wait_scan
  [SCSI] fix async probe regression
  [SCSI] be2iscsi: fix dma free size mismatch regression
  [SCSI] qla4xxx: Update driver version to 5.02.00-k17
  [SCSI] qla4xxx: Capture minidump for ISP82XX on firmware failure
  [SCSI] qla4xxx: Add change_queue_depth API support
  [SCSI] qla4xxx: Fix clear ddb mbx command failure issue.
  [SCSI] qla4xxx: Fix kernel panic during discovery logout.
  [SCSI] qla4xxx: Correct early completion of pending mbox.
  [SCSI] fcoe, bnx2fc, libfcoe: SW FCoE and bnx2fc use FCoE Syfs
  [SCSI] libfcoe: Add fcoe_sysfs
  [SCSI] bnx2fc: Allocate fcoe_ctlr with bnx2fc_interface, not as a member
  [SCSI] fcoe: Allocate fcoe_ctlr with fcoe_interface, not as a member
  [SCSI] Fix dm-multipath starvation when scsi host is busy
  [SCSI] ufs: fix potential NULL pointer dereferencing error in ufshcd_prove.
  [SCSI] qla2xxx: don't free pool that wasn't allocated
  [SCSI] mptfusion: unlock on error in mpt_config()
  [SCSI] tcm_qla2xxx: Add >= 24xx series fabric module for target-core
  [SCSI] qla2xxx: Add LLD target-mode infrastructure for >= 24xx series
  [SCSI] Revert "qla2xxx: During loopdown perform Diagnostic loopback."
  ...

12 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Thu, 31 May 2012 19:00:09 +0000 (12:00 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull follow-up block updates from Jens Axboe:
 "Includes the fix from Eric to resolve the infinite loop in looking up
  or creating an IO context for an exiting task.

  Also a bunch of mtip32xx patches.  Fairly trivial stuff.  It's fairly
  new though, but no point in keeping it out of the tree until 3.6 imho.
  I've thrown it through basic testing locally as well, works fine.  The
  one contentious part is the patch that Greg complained about (sysfs
  file with multiple values, should be a debugfs file), which is
  perfectly valid, but not a regression from what the file contains now.
  That will be fixed up separately."

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: avoid infinite loop in get_task_io_context()
  mtip32xx: Changes to sysfs entries
  mtip32xx: Convert macro definitions for flag bits to enum
  mtip32xx: minor performance tweak
  mtip32xx: Fix to support more than one sector in exec_drive_command()
  mtip32xx: Use plain spinlock for 'cmd_issue_lock'
  mtip32xx: Set block queue boundary variables
  mtip32xx: Fix to handle TFE for PIO(IOCTL/internal) commands
  mtip32xx: Change HDIO_GET_IDENTITY to return stored data
  mtip32xx: Set custom timeouts for PIO commands
  mtip32xx: fix clearing an incorrect register in mtip_init_port

12 years agotty: add lockdep annotations
Eric Dumazet [Thu, 31 May 2012 09:35:18 +0000 (11:35 +0200)]
tty: add lockdep annotations

tty_lock_pair() do the right thing to avoid deadlocks, but should
instruct LOCKDEP of this to avoid a splat.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoNFS: Ensure that setattr and getattr wait for O_DIRECT write completion
Trond Myklebust [Thu, 31 May 2012 16:22:33 +0000 (12:22 -0400)]
NFS: Ensure that setattr and getattr wait for O_DIRECT write completion

Use the same mechanism as the block devices are using, but move the
helper functions from fs/direct-io.c into fs/inode.c to remove the
dependency on CONFIG_BLOCK.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge tag 'please-pull-mce' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras
Linus Torvalds [Thu, 31 May 2012 17:53:37 +0000 (10:53 -0700)]
Merge tag 'please-pull-mce' of git://git./linux/kernel/git/ras/ras

Pull mce cleanup from Tony Luck:
 "One more mce cleanup before the 3.5 merge window closes"

* tag 'please-pull-mce' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  x86/mce: Cleanup timer mess

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Thu, 31 May 2012 17:51:10 +0000 (10:51 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/s390/linux

Pull s390 patches from Heiko Carstens:
 "A couple of s390 patches for the 3.5 merge window.  Just a collection
  of bug fixes and cleanups."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/uaccess: fix access_ok compile warnings
  s390/cmpxchg: select HAVE_CMPXCHG_LOCAL option
  s390/cmpxchg: fix sign extension bugs
  s390/cmpxchg: fix 1 and 2 byte memory accesses
  s390/cmpxchg: fix compile warnings specific to s390
  s390/cmpxchg: add missing memory barrier to cmpxchg64
  s390/cpu: remove cpu "capabilities" sysfs attribute
  s390/kernel: Fix smp_call_ipl_cpu() for offline CPUs
  s390/kernel: Introduce memcpy_absolute() function
  s390/headers: replace __s390x__ with CONFIG_64BIT where possible
  s390/headers: remove #ifdef __KERNEL__ from not exported headers
  s390/irq: split irq stats for cpu-measurement alert facilities
  s390/kexec: Move early_pgm_check_handler() to text section
  s390/kdump: Use real mode for PSW restart and kexec
  s390/kdump: Account /sys/kernel/kexec_crash_size changes in OS info
  s390/kernel: Remove OS info init function call and diag 308 for kdump

12 years agoMerge tag 'parisc-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
Linus Torvalds [Thu, 31 May 2012 17:44:34 +0000 (10:44 -0700)]
Merge tag 'parisc-misc' of git://git./linux/kernel/git/jejb/parisc-2.6

Pull misc parisc updates from James Bottomley:
 "This is a couple of updates to complete our fixes and one to fix a
  compile failure caused during the merge window.  Additionally, we now
  switch to the generic strncopy_from_user."

* tag 'parisc-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
  [PARISC] update parisc to use generic strncpy_from_user()
  [PARISC] Fix parisc compile failure after smp: Add task_struct argument to __cpu_up()
  [PARISC] fix TLB fault path on PA2.0 narrow systems
  [PARISC] fix boot failure on 32-bit systems caused by branch stubs placed before .text

12 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 31 May 2012 17:43:11 +0000 (10:43 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull additional x86 fixes from Peter Anvin.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, amd, xen: Avoid NULL pointer paravirt references
  x86, mtrr: Fix a type overflow in range_to_mtrr func
  x86, realmode: Unbreak the ia64 build of drivers/acpi/sleep.c
  x86/mm/pat: Improve scaling of pat_pagerange_is_ram()
  x86: hpet: Fix copy-and-paste mistake in earlier change
  x86/mce: Fix 32-bit build
  x86/bitops: Move BIT_64() for a wider use

12 years agoMerge tag 'devel-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Thu, 31 May 2012 17:41:39 +0000 (10:41 -0700)]
Merge tag 'devel-late' of git://git./linux/kernel/git/arm/arm-soc

Pull late-merged development and first fixes for arm-soc from Olof Johansson:
 "This branch contains a few development patches for Samsung and
  Versatile Express that were submitted to arm-soc near the beginning of
  the merge window.  We picked them up with the agreement that they
  would need to sit in linux-next for a while, and now they have.

  There are also two fixes:
   - One long-standing build breakage on ixp4xx due to missing gpiolib
     dependencies.
   - The other is for some gpio device tree changes needed on lpc32xx."

* tag 'devel-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: LPC32xx: Adjust dts files to gpio dt binding
  ixp4xx: fix compilation by adding gpiolib support
  ARM: vexpress: Remove twice included header files
  ARM: vexpress: Device Tree updates
  ARM: EXYNOS: Support suspend and resume for EXYNOS5250
  ARM: EXYNOS: Add Clock register list for save and restore
  ARM: EXYNOS: Add PMU table for EXYNOS5250
  ARM: EXYNOS: Rename of function for pm.c
  ARM: EXYNOS: Remove GIC save & restore function
  ARM: dts: Add node for interrupt combiner controller on EXYNOS5250
  ARM: S3C24XX: add support for second irq set of S3C2416
  ARM: S3C64XX: use timekeeping wrapper on cpuidle
  ARM: S3C64XX: declare the states with the new api on cpuidle
  ARM: S3C64XX: Hook up carrier class modules on Cragganmore
  ARM: S3C64XX: Initial hookup for Bells module on Cragganmore

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Thu, 31 May 2012 17:39:06 +0000 (10:39 -0700)]
Merge git://git./linux/kernel/git/davem/sparc

Pull Sparc updates from David S. Miller:

 1) Remove the idiotic situation wherein Leon was a special case in all
    of the TLB/cache handling code.

    The worst side effect of this bogosity is that you couldn't build a
    kernel with Leon support enabled (to get better build coverage), and
    test boot it on a non-LEON cpu.

    Leon is, in all core respects, programatically identical to the
    32-bit SRMMU.  Except that they put the TLB registers in a different
    alternate address space location.

    Through code patching (for fast paths) and run time checks, this
    issue is now a thing of the past.

    From Sam Ravnborg.

 2) There was a mis-merge of arch/sparc/Kconfig for one of the
    clockevents changes that went in, causing 32-bit sparc to start
    failing to build.

    I merged in your tree to get those clockevents changes (and added a
    note to the merge commit) then added Stephen Rothwell's fix for the
    merge error.

 3) Software quad floating point emulation was not working properly on
    more recent Niagara chips, because the way the situation is reported
    by the cpu has changed.

    Nobody noticed because gcc emits calls to software emulation
    routines in glibc.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: (25 commits)
  sparc: fix sparc64 build due to leon.h inclusion
  sparc32: remove unused variable in head_32.S
  sparc32,leon: fix leon bootup
  sparc32: Export leon_dma_ops to modules.
  sparc32: support leon + sun in dma_make_coherent()
  sparc32,leon: always support leon in ioport
  sparc32,leon: always include leon_pmc in build
  sparc32: refactor cpu_idle()
  sparc32: srmmu_probe now knows about leon too
  sparc32: drop LEON hack for ASI_M_MMUREGS
  sparc32: introduce run-time patching of srmmu access functions
  sparc32: introduce support for run-time patching for all shared assembler code
  sparc32,leon: fix section mismatch warning
  sparc32,leon: always include leon_smp + leon_mm in build
  sparc32,leon: always include leon_kernel in build
  sparc32,leon: clean up leon.h
  sparc32: handle leon in cpu.c
  sparc32: handle leon in irq_32.c
  sparc32: add support for run-time patching of leon/sun single instructions
  sparc32: introduce sparc32_start_kernel called from head_32.S
  ...

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 31 May 2012 17:32:36 +0000 (10:32 -0700)]
Merge git://git./linux/kernel/git/davem/net

Pull networking changes from David S. Miller:

 1) Fix IPSEC header length calculation for transport mode in ESP.  The
    issue is whether to do the calculation before or after alignment.
    Fix from Benjamin Poirier.

 2) Fix regression in IPV6 IPSEC fragment length calculations, from Gao
    Feng.  This is another transport vs tunnel mode issue.

 3) Handle AF_UNSPEC connect()s properly in L2TP to avoid OOPSes.  Fix
    from James Chapman.

 4) Fix USB ASIX driver's reception of full sized VLAN packets, from
    Eric Dumazet.

 5) Allow drop monitor (and, more generically, all generic netlink
    protocols) to be automatically loaded as a module.  From Neil
    Horman.

Fix up trivial conflict in Documentation/feature-removal-schedule.txt
due to new entries added next to each other at the end. As usual.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (38 commits)
  net/smsc911x: Repair broken failure paths
  virtio-net: remove useless disable on freeze
  netdevice: Update netif_dbg for CONFIG_DYNAMIC_DEBUG
  drop_monitor: Add module alias to enable automatic module loading
  genetlink: Build a generic netlink family module alias
  net: add MODULE_ALIAS_NET_PF_PROTO_NAME
  r6040: Do a Proper deinit at errorpath and also when driver unloads (calling r6040_remove_one)
  r6040: disable pci device if the subsequent calls (after pci_enable_device) fails
  skb: avoid unnecessary reallocations in __skb_cow
  net: sh_eth: fix the rxdesc pointer when rx descriptor empty happens
  asix: allow full size 8021Q frames to be received
  rds_rdma: don't assume infiniband device is PCI
  l2tp: fix oops in L2TP IP sockets for connect() AF_UNSPEC case
  mac80211: fix ADDBA declined after suspend with wowlan
  wlcore: fix undefined symbols when CONFIG_PM is not defined
  mac80211: fix flag check for QoS NOACK frames
  ath9k_hw: apply internal regulator settings on AR933x
  ath9k_hw: update AR933x initvals to fix issues with high power devices
  ath9k: fix a use-after-free-bug when ath_tx_setup_buffer() fails
  ath9k: stop rx dma before stopping tx
  ...

12 years agoradeon: add radeon prime vmap support.
Dave Airlie [Thu, 31 May 2012 12:52:53 +0000 (13:52 +0100)]
radeon: add radeon prime vmap support.

This is the same as the nouveau code pretty much.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agonouveau: add vmap support to nouveau prime support
Dave Airlie [Thu, 31 May 2012 12:52:17 +0000 (13:52 +0100)]
nouveau: add vmap support to nouveau prime support

Tested sharing to udl.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoudl: support vmapping imported dma-bufs
Dave Airlie [Mon, 26 Mar 2012 13:36:56 +0000 (14:36 +0100)]
udl: support vmapping imported dma-bufs

This allows udl to get a vmapping of an imported buffer for scanout.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoi915: add dma-buf vmap support for exporting vmapped buffer
Dave Airlie [Tue, 22 May 2012 12:09:21 +0000 (13:09 +0100)]
i915: add dma-buf vmap support for exporting vmapped buffer

This is used to export a vmapping to the udl driver so that
i915 and udl can share the udl scanout.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoradeon: add stub dma-buf mmap functionality
Dave Airlie [Tue, 29 May 2012 14:12:24 +0000 (15:12 +0100)]
radeon: add stub dma-buf mmap functionality

This just adds a stub until we have pieces in place to test
a correct one.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agonouveau: add stub dma-buf mmap functionality.
Dave Airlie [Tue, 29 May 2012 14:11:55 +0000 (15:11 +0100)]
nouveau: add stub dma-buf mmap functionality.

This just adds a stub until we have some users in place to test
this with.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoi915: add stub dma-buf mmap callback.
Dave Airlie [Tue, 29 May 2012 14:11:22 +0000 (15:11 +0100)]
i915: add stub dma-buf mmap callback.

This just adds a stub for now, until we have some users in
place to test this functionality properly.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoblock: avoid infinite loop in get_task_io_context()
Eric Dumazet [Thu, 31 May 2012 11:39:05 +0000 (13:39 +0200)]
block: avoid infinite loop in get_task_io_context()

Calling get_task_io_context() on a exiting task which isn't %current can
loop forever. This triggers at boot time on my dev machine.

BUG: soft lockup - CPU#3 stuck for 22s ! [mountall.1603]

Fix this by making create_task_io_context() returns -EBUSY in this case
to break the loop.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years ago[PARISC] update parisc to use generic strncpy_from_user()
James Bottomley [Sat, 26 May 2012 08:48:19 +0000 (09:48 +0100)]
[PARISC] update parisc to use generic strncpy_from_user()

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agomtip32xx: Changes to sysfs entries
Asai Thambi S P [Wed, 30 May 2012 01:44:54 +0000 (18:44 -0700)]
mtip32xx: Changes to sysfs entries

* Formatted the output of 'registers' entry
* Added "Commands in Q' to output of 'registers' entry
* Added a new entry 'flags'

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: Convert macro definitions for flag bits to enum
Asai Thambi S P [Wed, 30 May 2012 01:44:27 +0000 (18:44 -0700)]
mtip32xx: Convert macro definitions for flag bits to enum

Convert macro definitions for flags bits to enum

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: minor performance tweak
Asai Thambi S P [Wed, 30 May 2012 01:44:01 +0000 (18:44 -0700)]
mtip32xx: minor performance tweak

When checking for command completions if the register value is zero, proceed
to next register.

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: Fix to support more than one sector in exec_drive_command()
Asai Thambi S P [Wed, 30 May 2012 01:43:31 +0000 (18:43 -0700)]
mtip32xx: Fix to support more than one sector in exec_drive_command()

Fix to support more than one sector in exec_drive_command().

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: Use plain spinlock for 'cmd_issue_lock'
Asai Thambi S P [Wed, 30 May 2012 01:43:16 +0000 (18:43 -0700)]
mtip32xx: Use plain spinlock for 'cmd_issue_lock'

'cmd_issue_lock' is for only acquiring a free slot, and it is not used
in interrupt context. So replaced irq version with non-irq version of spinlock.

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: Set block queue boundary variables
Asai Thambi S P [Wed, 30 May 2012 01:42:51 +0000 (18:42 -0700)]
mtip32xx: Set block queue boundary variables

Set the following block queue boundary variables
* max_hw_sectors
* max_segment_size

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Removed setting of q->nr_requests.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: Fix to handle TFE for PIO(IOCTL/internal) commands
Asai Thambi S P [Wed, 30 May 2012 01:42:27 +0000 (18:42 -0700)]
mtip32xx: Fix to handle TFE for PIO(IOCTL/internal) commands

If a PIO (IOCTL/internal) command resulted in TFE, signal the wait event or break out of polling.

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: Change HDIO_GET_IDENTITY to return stored data
Asai Thambi S P [Wed, 30 May 2012 01:41:47 +0000 (18:41 -0700)]
mtip32xx: Change HDIO_GET_IDENTITY to return stored data

For the ioctl command HDIO_GET_IDENTITY, return the stored copy of IDENTIFY
DATA instead of sending the command to the device - similar to libata.

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: Set custom timeouts for PIO commands
Asai Thambi S P [Wed, 30 May 2012 01:41:23 +0000 (18:41 -0700)]
mtip32xx: Set custom timeouts for PIO commands

This change sets custom timeouts depending on PIO command.

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: fix clearing an incorrect register in mtip_init_port
Asai Thambi S P [Wed, 30 May 2012 01:40:45 +0000 (18:40 -0700)]
mtip32xx: fix clearing an incorrect register in mtip_init_port

Fix clearing an incorrect register in mtip_init_port

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoMerge branches 'fixes' and 'fixes2' into devel-late
Olof Johansson [Wed, 30 May 2012 23:16:12 +0000 (16:16 -0700)]
Merge branches 'fixes' and 'fixes2' into devel-late

* fixes:
  ixp4xx: fix compilation by adding gpiolib support

* fixes2:
  ARM: LPC32xx: Adjust dts files to gpio dt binding

12 years agoARM: LPC32xx: Adjust dts files to gpio dt binding
Roland Stigge [Sat, 19 May 2012 10:28:53 +0000 (12:28 +0200)]
ARM: LPC32xx: Adjust dts files to gpio dt binding

The GPIO devicetree binding in 3.5 doesn't register the various LPC32xx GPIO
banks via DT subnodes but always all at once, and changes the gpio referencing
to 3 cells (bank, gpio, flags). This patch adjusts the DTS files to this
binding that was just accepted to the gpio subsystem.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
12 years agox86, amd, xen: Avoid NULL pointer paravirt references
Konrad Rzeszutek Wilk [Wed, 30 May 2012 22:23:56 +0000 (18:23 -0400)]
x86, amd, xen: Avoid NULL pointer paravirt references

Stub out MSR methods that aren't actually needed.  This fixes a crash
as Xen Dom0 on AMD Trinity systems.  A bigger patch should be added to
remove the paravirt machinery completely for the methods which
apparently have no users!

Reported-by: Andre Przywara <andre.przywara@amd.com>
Link: http://lkml.kernel.org/r/20120530222356.GA28417@andromeda.dapyr.net
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@vger.kernel.org>
12 years agoMerge branch 'late/board' into devel-late
Olof Johansson [Wed, 30 May 2012 23:06:56 +0000 (16:06 -0700)]
Merge branch 'late/board' into devel-late

* late/board:
  ARM: S3C64XX: Hook up carrier class modules on Cragganmore
  ARM: S3C64XX: Initial hookup for Bells module on Cragganmore

12 years agoMerge branch 'late/soc' into devel-late
Olof Johansson [Wed, 30 May 2012 23:06:46 +0000 (16:06 -0700)]
Merge branch 'late/soc' into devel-late

* late/soc:
  ARM: vexpress: Remove twice included header files
  ARM: vexpress: Device Tree updates
  ARM: EXYNOS: Support suspend and resume for EXYNOS5250
  ARM: EXYNOS: Add Clock register list for save and restore
  ARM: EXYNOS: Add PMU table for EXYNOS5250
  ARM: EXYNOS: Rename of function for pm.c
  ARM: EXYNOS: Remove GIC save & restore function
  ARM: dts: Add node for interrupt combiner controller on EXYNOS5250
  ARM: S3C24XX: add support for second irq set of S3C2416

12 years agoMerge branch 'late/cleanup' into devel-late
Olof Johansson [Wed, 30 May 2012 23:06:39 +0000 (16:06 -0700)]
Merge branch 'late/cleanup' into devel-late

* late/cleanup:
  ARM: S3C64XX: use timekeeping wrapper on cpuidle
  ARM: S3C64XX: declare the states with the new api on cpuidle

12 years agonet/smsc911x: Repair broken failure paths
Lee Jones [Tue, 29 May 2012 18:47:37 +0000 (18:47 +0000)]
net/smsc911x: Repair broken failure paths

Current failure paths attempt to free resources which we failed to request
and disable resources which we failed to enable ones. This leads to kernel
oops/panic. This patch does some simple re-ordering to prevent this from
happening.

Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agox86/mce: Cleanup timer mess
Thomas Gleixner [Thu, 24 May 2012 17:54:51 +0000 (17:54 +0000)]
x86/mce: Cleanup timer mess

Use unsigned long for dealing with jiffies not int. Rename the
callback to something sensible. Use __this_cpu_read/write for
accessing per cpu data.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
12 years agox86, mtrr: Fix a type overflow in range_to_mtrr func
zhenzhong.duan [Wed, 30 May 2012 04:52:15 +0000 (12:52 +0800)]
x86, mtrr: Fix a type overflow in range_to_mtrr func

When boot on sun G5+ with 4T mem, see an overflow in mtrr cleanup as below.

*BAD*gran_size: 2G      chunk_size: 2G  num_reg: 10     lose cover RAM:
-18014398505283592M

This is because 1<<31 sign extended. Use an unsigned long constant to
fix it.  Useful for mem larger than or equal to 4T.

-v2: Use 64bit constant instead of explicit type conversion as suggested
by Yinghai. Description updated too.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Link: http://lkml.kernel.org/r/4FC5A77F.6060505@oracle.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agovirtio-net: remove useless disable on freeze
Michael S. Tsirkin [Wed, 30 May 2012 14:21:29 +0000 (17:21 +0300)]
virtio-net: remove useless disable on freeze

disable_cb is just an optimization: it
can not guarantee that there are no callbacks.
In particular it doesn't have any effect when
event index is on.

Instead, detach, napi disable and reset on freeze ensure we don't run
concurrently with a callback.

Remove the useless calls so we get same behaviour
with and without event index.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetdevice: Update netif_dbg for CONFIG_DYNAMIC_DEBUG
Joe Perches [Wed, 30 May 2012 07:43:34 +0000 (07:43 +0000)]
netdevice: Update netif_dbg for CONFIG_DYNAMIC_DEBUG

Make netif_dbg use dynamic debugging whenever
CONFIG_DYNAMIC_DEBUG is enabled.

commit b558c96ffa53
("dynamic_debug: make dynamic-debug supersede DEBUG ccflag")
missed updating the netif_dbg variant.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'x86/trampoline' into x86/urgent
H. Peter Anvin [Wed, 30 May 2012 19:11:26 +0000 (12:11 -0700)]
Merge branch 'x86/trampoline' into x86/urgent

x86/trampoline contains an urgent commit which is necessarily on a
newer baseline.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Linus Torvalds [Wed, 30 May 2012 18:17:19 +0000 (11:17 -0700)]
Merge git://git./linux/kernel/git/sage/ceph-client

Pull ceph updates from Sage Weil:
 "There are some updates and cleanups to the CRUSH placement code, a bug
  fix with incremental maps, several cleanups and fixes from Josh Durgin
  in the RBD block device code, a series of cleanups and bug fixes from
  Alex Elder in the messenger code, and some miscellaneous bounds
  checking and gfp cleanups/fixes."

Fix up trivial conflicts in net/ceph/{messenger.c,osdmap.c} due to the
networking people preferring "unsigned int" over just "unsigned".

* git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (45 commits)
  libceph: fix pg_temp updates
  libceph: avoid unregistering osd request when not registered
  ceph: add auth buf in prepare_write_connect()
  ceph: rename prepare_connect_authorizer()
  ceph: return pointer from prepare_connect_authorizer()
  ceph: use info returned by get_authorizer
  ceph: have get_authorizer methods return pointers
  ceph: ensure auth ops are defined before use
  ceph: messenger: reduce args to create_authorizer
  ceph: define ceph_auth_handshake type
  ceph: messenger: check return from get_authorizer
  ceph: messenger: rework prepare_connect_authorizer()
  ceph: messenger: check prepare_write_connect() result
  ceph: don't set WRITE_PENDING too early
  ceph: drop msgr argument from prepare_write_connect()
  ceph: messenger: send banner in process_connect()
  ceph: messenger: reset connection kvec caller
  libceph: don't reset kvec in prepare_write_banner()
  ceph: ignore preferred_osd field
  ceph: fully initialize new layout
  ...

12 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 30 May 2012 18:12:00 +0000 (11:12 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf updates from Ingo Molnar.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
  perf ui browser: Stop using 'self'
  perf annotate browser: Read perf config file for settings
  perf config: Allow '_' in config file variable names
  perf annotate browser: Make feature toggles global
  perf annotate browser: The idx_asm field should be used in asm only view
  perf tools: Convert critical messages to ui__error()
  perf ui: Make --stdio default when TUI is not supported
  tools lib traceevent: Silence compiler warning on 32bit build
  perf record: Fix branch_stack type in perf_record_opts
  perf tools: Reconstruct event with modifiers from perf_event_attr
  perf top: Fix counter name fixup when fallbacking to cpu-clock
  perf tools: fix thread_map__new_by_pid_str() memory leak in error path
  perf tools: Do not use _FORTIFY_SOURCE when DEBUG=1 is specified
  tools lib traceevent: Fix signature of create_arg_item()
  tools lib traceevent: Use proper function parameter type
  tools lib traceevent: Fix freeing arg on process_dynamic_array()
  tools lib traceevent: Fix a possibly wrong memory dereference
  tools lib traceevent: Fix a possible memory leak
  tools lib traceevent: Allow expressions in __print_symbolic() fields
  perf evlist: Explicititely initialize input_name
  ...

12 years agox86, realmode: Unbreak the ia64 build of drivers/acpi/sleep.c
H. Peter Anvin [Wed, 30 May 2012 09:33:41 +0000 (12:33 +0300)]
x86, realmode: Unbreak the ia64 build of drivers/acpi/sleep.c

Revert usage of acpi_wakeup_address and move definition
to x86 architecture code in order to make compilation work
in ia64.

[jsakkine: tested compilation in ia64/x86-64 and added
proper commit message]

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Originally-by: H. Peter Anvin <hpa@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Link: http://lkml.kernel.org/r/1338370421-27735-1-git-send-email-jarkko.sakkinen@intel.com
Cc: Tony Luck <tony.luck@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Wed, 30 May 2012 17:03:46 +0000 (10:03 -0700)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging

Pull i2c updates from Jean Delvare.

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING
  i2c-dev: Add support for I2C_M_RECV_LEN

12 years agoMerge git://www.linux-watchdog.org/linux-watchdog
Linus Torvalds [Wed, 30 May 2012 16:59:13 +0000 (09:59 -0700)]
Merge git://www.linux-watchdog.org/linux-watchdog

Pull second set of watchdog updates from Wim Van Sebroeck:
 "This changeset contains following changes:
   * Add support for multiple watchdog devices.  We use dynamically
     allocated device id's for this.
   * Add locking into the generic watchdog infrastructure.
   * Add support for dynamically allocated watchdog_device structs so
     that we can deal with devices that get unbound.
   * convert following drivers to the generic watchdog framework:
     sch5627, sch5636 and sp805_wdt.
   * Add DA9052/53 PMIC watchdog support
   * Fix printk format warnings for iTCO_wdt.c"

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: iTCO_wdt.c: fix printk format warnings
  watchdog: sp805_wdt: Add clk_{un}prepare support
  watchdog: sp805_wdt: convert to watchdog core
  hwmon/sch56xx: Depend on watchdog for watchdog core functions
  watchdog: sch56xx-common: set correct bits in register()
  Watchdog: DA9052/53 PMIC watchdog support
  watchdog: sch56xx-common: Add proper ref-counting of watchdog data
  watchdog: sch56xx: Remove unnecessary checks for register changes
  watchdog: sch56xx: Use watchdog core
  watchdog: Add support for dynamically allocated watchdog_device structs
  watchdog: Add Locking support
  watchdog: watchdog_dev: Rewrite wrapper code
  watchdog: use dev_ functions
  watchdog: create all the proper device files
  watchdog: Add a flag to indicate the watchdog doesn't reboot things
  watchdog: Add multiple device support
  watchdog: watchdog_core.h: make functions extern
  watchdog: correct the name of the watchdog_core inlude file
  watchdog: Add watchdog_active() routine
  watchdog: watchdog_dev: include private header to pickup global symbol prototypes

12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 30 May 2012 16:55:53 +0000 (09:55 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Just regular fixes, bunch from intel, quieting some of the over
  zealous power warnings, and the rest just misc.

  I've got another pull with the remaining dma-buf bits, since the vmap
  bits are in your tree now.  I'll send tomorrow just to space things
  out a bit."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (22 commits)
  drm/edid/quirks: ViewSonic VA2026w
  drm/udl: remove unused variables.
  drm/radeon: fix XFX quirk
  drm: Use stdint types for consistency
  drm: Constify params to format_check() and framebuffer_checks()
  drm/radeon: fix typo in trinity tiling setup
  drm/udl: unlock before returning in udl_gem_mmap()
  radeon: make radeon_cs_update_pages static.
  drm/i915: tune down the noise of the RP irq limit fail
  drm/i915: Remove the error message for unbinding pinned buffers
  drm/i915: Limit page allocations to lowmem (dma32) for i965
  drm/i915: always use RPNSWREQ for turbo change requests
  drm/i915: reject doubleclocked cea modes on dp
  drm/i915: Adding TV Out Missing modes.
  drm/i915: wait for a vblank to pass after tv detect
  drm/i915: no lvds quirk for HP t5740e Thin Client
  drm/i915: enable vdd when switching off the eDP panel
  drm/i915: Fix PCH PLL assertions to not assume CRTC:PLL relationship
  drm/i915: Always update RPS interrupts thresholds along with frequency
  drm/i915: properly handle interlaced bit for sdvo dtd conversion
  ...

12 years agoMerge branch 'for-3.5/drivers' of git://git.kernel.dk/linux-block
Linus Torvalds [Wed, 30 May 2012 16:05:47 +0000 (09:05 -0700)]
Merge branch 'for-3.5/drivers' of git://git.kernel.dk/linux-block

Pull block driver updates from Jens Axboe:
 "Here are the driver related changes for 3.5.  It contains:

   - The floppy changes from Jiri.  Jiri is now also marked as the
     maintainer of floppy.c, I shall be publically branding his forehead
     with red hot iron at the next opportune moment.

   - A batch of drbd updates and fixes from the linbit crew, as well as
     fixes from others.

   - Two small fixes for xen-blkfront courtesy of Jan."

* 'for-3.5/drivers' of git://git.kernel.dk/linux-block: (70 commits)
  floppy: take over maintainership
  floppy: remove floppy-specific O_EXCL handling
  floppy: convert to delayed work and single-thread wq
  xen-blkfront: module exit handling adjustments
  xen-blkfront: properly name all devices
  drbd: grammar fix in log message
  drbd: check MODULE for THIS_MODULE
  drbd: Restore the request restart logic
  drbd: introduce a bio_set to allocate housekeeping bios from
  drbd: remove unused define
  drbd: bm_page_async_io: properly initialize page->private
  drbd: use the newly introduced page pool for bitmap IO
  drbd: add page pool to be used for meta data IO
  drbd: allow bitmap to change during writeout from resync_finished
  drbd: fix race between drbdadm invalidate/verify and finishing resync
  drbd: fix resend/resubmit of frozen IO
  drbd: Ensure that data_size is not 0 before using data_size-1 as index
  drbd: Delay/reject other state changes while establishing a connection
  drbd: move put_ldev from __req_mod() to the endio callback
  drbd: fix WRITE_ACKED_BY_PEER_AND_SIS to not set RQ_NET_DONE
  ...

12 years agoMerge branch 'for-3.5/core' of git://git.kernel.dk/linux-block
Linus Torvalds [Wed, 30 May 2012 15:52:42 +0000 (08:52 -0700)]
Merge branch 'for-3.5/core' of git://git.kernel.dk/linux-block

Merge block/IO core bits from Jens Axboe:
 "This is a bit bigger on the core side than usual, but that is purely
  because we decided to hold off on parts of Tejun's submission on 3.4
  to give it a bit more time to simmer.  As a consequence, it's seen a
  long cycle in for-next.

  It contains:

   - Bug fix from Dan, wrong locking type.
   - Relax splice gifting restriction from Eric.
   - A ton of updates from Tejun, primarily for blkcg.  This improves
     the code a lot, making the API nicer and cleaner, and also includes
     fixes for how we handle and tie policies and re-activate on
     switches.  The changes also include generic bug fixes.
   - A simple fix from Vivek, along with a fix for doing proper delayed
     allocation of the blkcg stats."

Fix up annoying conflict just due to different merge resolution in
Documentation/feature-removal-schedule.txt

* 'for-3.5/core' of git://git.kernel.dk/linux-block: (92 commits)
  blkcg: tg_stats_alloc_lock is an irq lock
  vmsplice: relax alignement requirements for SPLICE_F_GIFT
  blkcg: use radix tree to index blkgs from blkcg
  blkcg: fix blkcg->css ref leak in __blkg_lookup_create()
  block: fix elvpriv allocation failure handling
  block: collapse blk_alloc_request() into get_request()
  blkcg: collapse blkcg_policy_ops into blkcg_policy
  blkcg: embed struct blkg_policy_data in policy specific data
  blkcg: mass rename of blkcg API
  blkcg: style cleanups for blk-cgroup.h
  blkcg: remove blkio_group->path[]
  blkcg: blkg_rwstat_read() was missing inline
  blkcg: shoot down blkgs if all policies are deactivated
  blkcg: drop stuff unused after per-queue policy activation update
  blkcg: implement per-queue policy activation
  blkcg: add request_queue->root_blkg
  blkcg: make request_queue bypassing on allocation
  blkcg: make sure blkg_lookup() returns %NULL if @q is bypassing
  blkcg: make blkg_conf_prep() take @pol and return with queue lock held
  blkcg: remove static policy ID enums
  ...

12 years agoMerge tag 'iommu-updates-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro...
Linus Torvalds [Wed, 30 May 2012 15:49:28 +0000 (08:49 -0700)]
Merge tag 'iommu-updates-v3.5' of git://git./linux/kernel/git/joro/iommu

Pull IOMMU updates from Joerg Roedel:
 "Not much stuff this time.  The only change to the IOMMU core code is
  the addition of a handle to the fault handling code.  A few updates to
  the AMD IOMMU driver to work around new errata.  The other patches are
  mostly fixes and enhancements to the existing ARM IOMMU drivers and
  documentation updates.

  A new IOMMU driver for the Exynos platform was also underway but got
  merged via the Samsung tree and is not part of this tree."

* tag 'iommu-updates-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  Documentation: kernel-parameters.txt Add amd_iommu_dump
  iommu/core: pass a user-provided token to fault handlers
  iommu/tegra: gart: Fix register offset correctly
  iommu: OMAP: device detach on domain destroy
  iommu: tegra/gart: Add device tree support
  iommu: tegra/gart: use correct gart_device
  iommu/tegra: smmu: Print device name correctly
  iommu/amd: Add workaround for event log erratum
  iommu/amd: Check for the right TLP prefix bit
  dma-debug: release free_entries_lock before saving stack trace

12 years agomm: fix vma_resv_map() NULL pointer
Dave Hansen [Wed, 30 May 2012 14:51:07 +0000 (07:51 -0700)]
mm: fix vma_resv_map() NULL pointer

hugetlb_reserve_pages() can be used for either normal file-backed
hugetlbfs mappings, or MAP_HUGETLB.  In the MAP_HUGETLB, semi-anonymous
mode, there is not a VMA around.  The new call to resv_map_put() assumed
that there was, and resulted in a NULL pointer dereference:

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
  IP: vma_resv_map+0x9/0x30
  PGD 141453067 PUD 1421e1067 PMD 0
  Oops: 0000 [#1] PREEMPT SMP
  ...
  Pid: 14006, comm: trinity-child6 Not tainted 3.4.0+ #36
  RIP: vma_resv_map+0x9/0x30
  ...
  Process trinity-child6 (pid: 14006, threadinfo ffff8801414e0000, task ffff8801414f26b0)
  Call Trace:
    resv_map_put+0xe/0x40
    hugetlb_reserve_pages+0xa6/0x1d0
    hugetlb_file_setup+0x102/0x2c0
    newseg+0x115/0x360
    ipcget+0x1ce/0x310
    sys_shmget+0x5a/0x60
    system_call_fastpath+0x16/0x1b

This was reported by Dave Jones, but was reproducible with the
libhugetlbfs test cases, so shame on me for not running them in the
first place.

With this, the oops is gone, and the output of libhugetlbfs's
run_tests.py is identical to plain 3.4 again.

[ Marked for stable, since this was introduced by commit c50ac050811d
  ("hugetlb: fix resv_map leak in error path") which was also marked for
  stable ]

Reported-by: Dave Jones <davej@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org> [2.6.32+]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Wed, 30 May 2012 14:32:16 +0000 (10:32 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem

12 years agoMerge branch 'x86/mce' into x86/urgent
Ingo Molnar [Wed, 30 May 2012 12:12:06 +0000 (14:12 +0200)]
Merge branch 'x86/mce' into x86/urgent

Merge in these fixlets.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
12 years agoMerge branches 'iommu/fixes', 'dma-debug', 'arm/omap', 'arm/tegra', 'core' and 'x86...
Joerg Roedel [Wed, 30 May 2012 10:41:29 +0000 (12:41 +0200)]
Merge branches 'iommu/fixes', 'dma-debug', 'arm/omap', 'arm/tegra', 'core' and 'x86/amd' into next

12 years agoDocumentation: kernel-parameters.txt Add amd_iommu_dump
Shuah Khan [Thu, 24 May 2012 21:58:25 +0000 (15:58 -0600)]
Documentation: kernel-parameters.txt Add amd_iommu_dump

Add amd_iommu_dump to kernel-parameters.txt

Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
12 years ago[SCSI] fix scsi_wait_scan
James Bottomley [Wed, 30 May 2012 09:45:39 +0000 (09:45 +0000)]
[SCSI] fix scsi_wait_scan

Commit  c751085943362143f84346d274e0011419c84202
Author: Rafael J. Wysocki <rjw@sisk.pl>
Date:   Sun Apr 12 20:06:56 2009 +0200

    PM/Hibernate: Wait for SCSI devices scan to complete during resume

Broke the scsi_wait_scan module in 2.6.30.  Apparently debian still uses it so
fix it and backport to stable before removing it in 3.6.

The breakage is caused because the function template in
include/scsi/scsi_scan.h is defined to be a nop unless SCSI is built in.
That means that in the modular case (which is every distro), the
scsi_wait_scan module does a simple async_synchronize_full() instead of
waiting for scans.

Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] fix async probe regression
Dan Williams [Fri, 25 May 2012 17:55:07 +0000 (10:55 -0700)]
[SCSI] fix async probe regression

Commit a7a20d1 "[SCSI] sd: limit the scope of the async probe domain"
moved sd probe work out of reach of wait_for_device_probe().  Allow it
to be synced via scsi_complete_async_scans().

Reported-by: Meelis Roos <mroos@linux.ee>
Tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] be2iscsi: fix dma free size mismatch regression
Mike Christie [Thu, 24 May 2012 01:40:54 +0000 (20:40 -0500)]
[SCSI] be2iscsi: fix dma free size mismatch regression

This patch should go into 3.5 fixes. The bug was added in the
patches for the 3.5 feature window.

As you can see from the patch I made a mistake. During
development I switched from passing a struct to the size of
the struct, but left the sizeof. This results in us allocating
4 bytes (sizeof(int)) but then calling pci_free_consistent
with the size of the struct.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Update driver version to 5.02.00-k17
Vikas Chaudhary [Tue, 24 Apr 2012 05:32:37 +0000 (22:32 -0700)]
[SCSI] qla4xxx: Update driver version to 5.02.00-k17

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Capture minidump for ISP82XX on firmware failure
Tej Parkash [Fri, 18 May 2012 08:41:44 +0000 (04:41 -0400)]
[SCSI] qla4xxx: Capture minidump for ISP82XX on firmware failure

Added support to capture dump (Minidump) which allows us to
catpure a snapshot of the firmware/hardware states at the time
of firmware failure

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Add change_queue_depth API support
Tej Parkash [Mon, 30 Apr 2012 11:12:19 +0000 (04:12 -0700)]
[SCSI] qla4xxx: Add change_queue_depth API support

change_queue_depth will adjust device queuedepth upon receiving
"SAM_STAT_TASK_SET_FULL" scsi status from the target.
Also added ql4xqfulltracking command line param to enable or disable
queuefull tracking. One can disabling queuefull tracking to ensure
user set scsi device queuedepth is not altered.

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Fix clear ddb mbx command failure issue.
Manish Rangankar [Tue, 24 Apr 2012 05:32:34 +0000 (22:32 -0700)]
[SCSI] qla4xxx: Fix clear ddb mbx command failure issue.

Allow ddb state to change to DDB_DS_NO_CONNECTION_ACTIVE or
DDB_DS_SESSION_FAILED before issuing clear ddb mailbox cmd,
because clear ddb mailbox cmd fails if the ddb state is not
equal to DDB_DS_NO_CONNECTION_ACTIVE or DDB_DS_SESSION_FAILED.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agox86/mm/pat: Improve scaling of pat_pagerange_is_ram()
John Dykstra [Fri, 25 May 2012 21:12:46 +0000 (16:12 -0500)]
x86/mm/pat: Improve scaling of pat_pagerange_is_ram()

Function pat_pagerange_is_ram() scales poorly to large address
ranges, because it probes the resource tree for each page.

On a 2.6 GHz Opteron, this function consumes 34 ms for a 1 GB range.

It is called twice during untrack_pfn_vma(), slowing process
cleanup and handicapping the OOM killer.

This replacement consumes less than 1ms, under the same conditions.

Signed-off-by: John Dykstra <jdykstra@cray.com> on behalf of Cray Inc.
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1337980366.1979.6.camel@redwood
[ Small stylistic cleanups and renames ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
12 years ago[SCSI] qla4xxx: Fix kernel panic during discovery logout.
Manish Rangankar [Tue, 24 Apr 2012 05:32:33 +0000 (22:32 -0700)]
[SCSI] qla4xxx: Fix kernel panic during discovery logout.

Update the session and connection parameter before sending
connection logged in event to iscsiadm because in some
scenario logout may come in just after we send the logged
in event to user, which free up session, connection and ddb,
but DPC is still updating session and connect parameter
which can lead to panic.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>