]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 years agoMerge branch 'bugfixes'
Trond Myklebust [Fri, 22 Jan 2016 16:02:36 +0000 (11:02 -0500)]
Merge branch 'bugfixes'

* bugfixes:
  pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn
  pNFS/flexfiles: Improve merging of errors in LAYOUTRETURN

8 years agopNFS/flexfiles: Fix an XDR encoding bug in layoutreturn
Trond Myklebust [Thu, 21 Jan 2016 20:39:40 +0000 (15:39 -0500)]
pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn

We must not skip encoding the statistics, or the server will see an
XDR encoding error.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: stable@vger.kernel.org # 4.0+
8 years agoNFS: Simplify nfs_request_add_commit_list() arguments
Anna Schumaker [Fri, 15 Jan 2016 21:54:15 +0000 (16:54 -0500)]
NFS: Simplify nfs_request_add_commit_list() arguments

I noticed that all the callers of this function pass cinfo->mds->list as
an argument in addition to the cinfo structure itself.  Let's get rid of
the extra argument, since it doesn't seem to be adding anything.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS/flexfiles: Improve merging of errors in LAYOUTRETURN
Trond Myklebust [Thu, 21 Jan 2016 19:48:49 +0000 (14:48 -0500)]
pNFS/flexfiles: Improve merging of errors in LAYOUTRETURN

When we hit 22 errors, we start to overflow the memory buffers allocated
to the LAYOUTRETURN errors. The issue is that currently, RPC call reply
ordering determines how successful we are in merging errors that refer
to contiguous READ or WRITE requests.

Fix is to use an insertion sort to help detect contiguity.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS: Fix a compile warning about unused variable in nfs_generic_pg_pgios()
Trond Myklebust [Fri, 8 Jan 2016 13:12:47 +0000 (08:12 -0500)]
NFS: Fix a compile warning about unused variable in nfs_generic_pg_pgios()

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4: Fix a compile warning about no prototype for nfs4_ioctl()
Trond Myklebust [Fri, 8 Jan 2016 13:11:54 +0000 (08:11 -0500)]
NFSv4: Fix a compile warning about no prototype for nfs4_ioctl()

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoMerge branch 'bugfixes'
Trond Myklebust [Thu, 7 Jan 2016 23:45:36 +0000 (18:45 -0500)]
Merge branch 'bugfixes'

* bugfixes:
  SUNRPC: Fixup socket wait for memory
  SUNRPC: Fix a missing break in rpc_anyaddr()
  pNFS/flexfiles: Fix an Oopsable typo in ff_mirror_match_fh()
  NFS: Fix attribute cache revalidation
  NFS: Ensure we revalidate attributes before using execute_ok()
  NFS: Flush reclaim writes using FLUSH_COND_STABLE
  NFS: Background flush should not be low priority
  NFSv4.1/pnfs: Fixup an lo->plh_block_lgets imbalance in layoutreturn
  NFSv4: Don't perform cached access checks before we've OPENed the file
  NFS: Allow the combination pNFS and labeled NFS
  NFS42: handle layoutstats stateid error
  nfs: Fix race in __update_open_stateid()
  nfs: fix missing assignment in nfs4_sequence_done tracepoint

8 years agoNFS: Use wait_on_atomic_t() for unlock after readahead
Benjamin Coddington [Wed, 6 Jan 2016 15:40:18 +0000 (10:40 -0500)]
NFS: Use wait_on_atomic_t() for unlock after readahead

The use of wait_on_atomic_t() for waiting on I/O to complete before
unlocking allows us to git rid of the NFS_IO_INPROGRESS flag, and thus the
nfs_iocounter's flags member, and finally the nfs_iocounter altogether.
The count of I/O is moved to the lock context, and the counter
increment/decrement functions become simple enough to open-code.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
[Trond: Fix up conflict with existing function nfs_wait_atomic_killable()]
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoSUNRPC: Fixup socket wait for memory
Trond Myklebust [Wed, 6 Jan 2016 13:57:06 +0000 (08:57 -0500)]
SUNRPC: Fixup socket wait for memory

We're seeing hangs in the NFS client code, with loops of the form:

 RPC: 30317 xmit incomplete (267368 left of 524448)
 RPC: 30317 call_status (status -11)
 RPC: 30317 call_transmit (status 0)
 RPC: 30317 xprt_prepare_transmit
 RPC: 30317 xprt_transmit(524448)
 RPC:       xs_tcp_send_request(267368) = -11
 RPC: 30317 xmit incomplete (267368 left of 524448)
 RPC: 30317 call_status (status -11)
 RPC: 30317 call_transmit (status 0)
 RPC: 30317 xprt_prepare_transmit
 RPC: 30317 xprt_transmit(524448)

Turns out commit ceb5d58b2170 ("net: fix sock_wake_async() rcu protection")
moved SOCKWQ_ASYNC_NOSPACE out of sock->flags and into sk->sk_wq->flags,
however it never tried to fix up the code in net/sunrpc.

The new idiom is to use the flags in the RCU protected struct socket_wq.
While we're at it, clear out the now redundant places where we set/clear
SOCKWQ_ASYNC_NOSPACE and SOCK_NOSPACE. In principle, sk_stream_wait_memory()
is supposed to set these for us, so we only need to clear them in the
particular case of our ->write_space() callback.

Fixes: ceb5d58b2170 ("net: fix sock_wake_async() rcu protection")
Cc: Eric Dumazet <edumazet@google.com>
Cc: stable@vger.kernel.org # 4.4
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoMerge branch 'pnfs_generic'
Trond Myklebust [Mon, 4 Jan 2016 18:19:55 +0000 (13:19 -0500)]
Merge branch 'pnfs_generic'

* pnfs_generic:
  NFSv4.1/pNFS: Cleanup constify struct pnfs_layout_range arguments
  NFSv4.1/pnfs: Cleanup copying of pnfs_layout_range structures
  NFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid()
  NFSv4.1/pNFS: Fix a race in initiate_file_draining()
  NFSv4.1/pNFS: pnfs_error_mark_layout_for_return() must always return layout
  NFSv4.1/pNFS: pnfs_mark_matching_lsegs_return() should set the iomode
  NFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids
  NFSv4.1/pNFS: Don't pass stateids by value to pnfs_send_layoutreturn()
  NFS: Relax requirements in nfs_flush_incompatible
  NFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid
  NFS: Allow multiple commit requests in flight per file
  NFS/pNFS: Fix up pNFS write reschedule layering violations and bugs
  NFSv4: List stateid information in the callback tracepoints
  NFSv4.1/pNFS: Don't return NFS4ERR_DELAY unnecessarily in CB_LAYOUTRECALL
  NFSv4.1/pNFS: Ensure we enforce RFC5661 Section 12.5.5.2.1
  pNFS: If we have to delay the layout callback, mark the layout for return
  NFSv4.1/pNFS: Add a helper to mark the layout as returned
  pNFS: Ensure nfs4_layoutget_prepare returns the correct error

8 years agoNFSv4.1/pNFS: Cleanup constify struct pnfs_layout_range arguments
Trond Myklebust [Mon, 4 Jan 2016 18:04:47 +0000 (13:04 -0500)]
NFSv4.1/pNFS: Cleanup constify struct pnfs_layout_range arguments

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pnfs: Cleanup copying of pnfs_layout_range structures
Trond Myklebust [Mon, 4 Jan 2016 17:52:53 +0000 (12:52 -0500)]
NFSv4.1/pnfs: Cleanup copying of pnfs_layout_range structures

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid()
Trond Myklebust [Mon, 4 Jan 2016 17:41:15 +0000 (12:41 -0500)]
NFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid()

Make it more obvious what we're returning...

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: Fix a race in initiate_file_draining()
Trond Myklebust [Mon, 4 Jan 2016 16:28:11 +0000 (11:28 -0500)]
NFSv4.1/pNFS: Fix a race in initiate_file_draining()

Peng Tao points out that the call to pnfs_mark_matching_lsegs_return()
could race with pnfs_put_lseg(), in which case the layout segment is
cleared, but no layoutreturn will be sent.
Fix is to replace the call to pnfs_mark_matching_lsegs_invalid().

Reported-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: pnfs_error_mark_layout_for_return() must always return layout
Trond Myklebust [Mon, 4 Jan 2016 16:23:52 +0000 (11:23 -0500)]
NFSv4.1/pNFS: pnfs_error_mark_layout_for_return() must always return layout

Fix a bug whereby if all the layout segments could be immediately freed,
the call to pnfs_error_mark_layout_for_return() would never result in
a layoutreturn.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: pnfs_mark_matching_lsegs_return() should set the iomode
Trond Myklebust [Mon, 4 Jan 2016 16:53:04 +0000 (11:53 -0500)]
NFSv4.1/pNFS: pnfs_mark_matching_lsegs_return() should set the iomode

If pnfs_mark_matching_lsegs_return() needs to mark a layout segment for
return, then it must also set the return iomode.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids
Trond Myklebust [Mon, 4 Jan 2016 17:22:46 +0000 (12:22 -0500)]
NFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: Don't pass stateids by value to pnfs_send_layoutreturn()
Trond Myklebust [Mon, 4 Jan 2016 17:30:55 +0000 (12:30 -0500)]
NFSv4.1/pNFS: Don't pass stateids by value to pnfs_send_layoutreturn()

A stateid is a structure, pass it as a pointer.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS: Relax requirements in nfs_flush_incompatible
Trond Myklebust [Thu, 1 Oct 2015 21:17:06 +0000 (17:17 -0400)]
NFS: Relax requirements in nfs_flush_incompatible

If two processes share the same credentials and NFSv4 open stateid, then
allow them both to dirty the same page, even if their nfs_open_context
differs.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid
Trond Myklebust [Thu, 31 Dec 2015 14:28:06 +0000 (09:28 -0500)]
NFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid

If the layout segment is invalid, then we should not be adding more
write requests to the commit list. Instead, those writes should be
replayed after requesting a new layout.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS: Allow multiple commit requests in flight per file
Trond Myklebust [Wed, 30 Sep 2015 00:34:05 +0000 (20:34 -0400)]
NFS: Allow multiple commit requests in flight per file

Allow synchronous RPC calls to wait for pending RPC calls to finish,
but also allow asynchronous ones to just fire off another commit.

With this patch, the xfstests generic/074 test completes in 226s
instead of 242s

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS/pNFS: Fix up pNFS write reschedule layering violations and bugs
Trond Myklebust [Thu, 31 Dec 2015 16:44:06 +0000 (11:44 -0500)]
NFS/pNFS: Fix up pNFS write reschedule layering violations and bugs

The flexfiles layout in particular, seems to want to poke around in the
O_DIRECT flags when retransmitting.
This patch sets up an interface to allow it to call back into O_DIRECT
to handle retransmission correctly. It also fixes a potential bug whereby
we could change the behaviour of O_DIRECT if an error is already pending.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoSUNRPC: Fix a missing break in rpc_anyaddr()
Trond Myklebust [Wed, 30 Dec 2015 23:14:06 +0000 (18:14 -0500)]
SUNRPC: Fix a missing break in rpc_anyaddr()

The missing break means that we always return EAFNOSUPPORT when
faced with a request for an IPv6 loopback address.

Reported-by: coverity (CID 401987)
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS/flexfiles: Fix an Oopsable typo in ff_mirror_match_fh()
Trond Myklebust [Wed, 30 Dec 2015 15:57:01 +0000 (10:57 -0500)]
pNFS/flexfiles: Fix an Oopsable typo in ff_mirror_match_fh()

Jeff reports seeing an Oops in ff_layout_alloc_lseg. Turns out
copy+paste has played cruel tricks on a nested loop.

Reported-by: Jeff Layton <jeff.layton@primarydata.com>
Cc: stable@vger.kernel.org # 4.3+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS: Fix attribute cache revalidation
Trond Myklebust [Tue, 29 Dec 2015 23:55:19 +0000 (18:55 -0500)]
NFS: Fix attribute cache revalidation

If a NFSv4 client uses the cache_consistency_bitmask in order to
request only information about the change attribute, timestamps and
size, then it has not revalidated all attributes, and hence the
attribute timeout timestamp should not be updated.

Reported-by: Donald Buczek <buczek@molgen.mpg.de>
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS: Ensure we revalidate attributes before using execute_ok()
Trond Myklebust [Tue, 29 Dec 2015 00:30:05 +0000 (19:30 -0500)]
NFS: Ensure we revalidate attributes before using execute_ok()

Donald Buczek reports that NFS clients can also report incorrect
results for access() due to lack of revalidation of attributes
before calling execute_ok().
Looking closely, it seems chdir() is afflicted with the same problem.

Fix is to ensure we call nfs_revalidate_inode_rcu() or
nfs_revalidate_inode() as appropriate before deciding to trust
execute_ok().

Reported-by: Donald Buczek <buczek@molgen.mpg.de>
Link: http://lkml.kernel.org/r/1451331530-3748-1-git-send-email-buczek@molgen.mpg.de
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoMerge branch 'flexfiles'
Trond Myklebust [Mon, 28 Dec 2015 19:49:41 +0000 (14:49 -0500)]
Merge branch 'flexfiles'

* flexfiles:
  pNFS/flexfiles: Ensure we record layoutstats even if RPC is terminated early
  pNFS: Add flag to track if we've called nfs4_ff_layout_stat_io_start_read/write
  pNFS/flexfiles: Fix a statistics gathering imbalance
  pNFS/flexfiles: Don't mark the entire layout as failed, when returning it
  pNFS/flexfiles: Don't prevent flexfiles client from retrying LAYOUTGET
  pnfs/flexfiles: count io stat in rpc_count_stats callback
  pnfs/flexfiles: do not mark delay-like status as DS failure
  NFS41: map NFS4ERR_LAYOUTUNAVAILABLE to ENODATA
  nfs: only remove page from mapping if launder_page fails
  nfs: handle request add failure properly
  nfs: centralize pgio error cleanup
  nfs: clean up rest of reqs when failing to add one
  NFS41: pop some layoutget errors to application
  pNFS/flexfiles: Support server-supplied layoutstats sampling period

8 years agoMerge tag 'nfs-rdma-4.5' of git://git.linux-nfs.org/projects/anna/nfs-rdma
Trond Myklebust [Mon, 28 Dec 2015 19:49:14 +0000 (14:49 -0500)]
Merge tag 'nfs-rdma-4.5' of git://git.linux-nfs.org/projects/anna/nfs-rdma

NFS: NFSoRDMA Client Side Changes

These patches mostly fix send queue ordering issues inside the NFSoRDMA
client, but there are also two patches from Dan Carpenter fixing up smatch
warnings.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
* tag 'nfs-rdma-4.5' of git://git.linux-nfs.org/projects/anna/nfs-rdma:
  xprtrdma: Revert commit e7104a2a9606 ('xprtrdma: Cap req_cqinit').
  xprtrdma: Invalidate in the RPC reply handler
  xprtrdma: Add ro_unmap_sync method for all-physical registration
  xprtrdma: Add ro_unmap_sync method for FMR
  xprtrdma: Add ro_unmap_sync method for FRWR
  xprtrdma: Introduce ro_unmap_sync method
  xprtrdma: Move struct ib_send_wr off the stack
  xprtrdma: Disable RPC/RDMA backchannel debugging messages
  xprtrdma: xprt_rdma_free() must not release backchannel reqs
  xprtrdma: Fix additional uses of spin_lock_irqsave(rb_lock)
  xprtrdma: checking for NULL instead of IS_ERR()
  xprtrdma: clean up some curly braces

8 years agoNFSv4: List stateid information in the callback tracepoints
Trond Myklebust [Mon, 28 Dec 2015 19:07:23 +0000 (14:07 -0500)]
NFSv4: List stateid information in the callback tracepoints

The stateid is extremely valuable when debugging.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: Don't return NFS4ERR_DELAY unnecessarily in CB_LAYOUTRECALL
Trond Myklebust [Mon, 28 Dec 2015 17:21:50 +0000 (12:21 -0500)]
NFSv4.1/pNFS: Don't return NFS4ERR_DELAY unnecessarily in CB_LAYOUTRECALL

If the client is promising to return the layout ASAP, then there is no
need to return DELAY and have the server retry. Instead default to the
normal procedure described in RFC5661.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: Ensure we enforce RFC5661 Section 12.5.5.2.1
Trond Myklebust [Mon, 28 Dec 2015 17:57:53 +0000 (12:57 -0500)]
NFSv4.1/pNFS: Ensure we enforce RFC5661 Section 12.5.5.2.1

The RFC requires us to check if the server is recalling a stateid that we
haven't yet received. If so, tell it to wait.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS: If we have to delay the layout callback, mark the layout for return
Trond Myklebust [Mon, 28 Dec 2015 15:28:59 +0000 (10:28 -0500)]
pNFS: If we have to delay the layout callback, mark the layout for return

If the client needs to delay the layout callback, then speed up the recall
process by marking the remaining layout segments to be actively returned
by the client.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pNFS: Add a helper to mark the layout as returned
Trond Myklebust [Mon, 28 Dec 2015 16:48:14 +0000 (11:48 -0500)]
NFSv4.1/pNFS: Add a helper to mark the layout as returned

This ensures that we don't reuse the stateid if a layout return or
implied layout return means that we've returned all layout segments

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS: Ensure nfs4_layoutget_prepare returns the correct error
Trond Myklebust [Mon, 28 Dec 2015 15:32:11 +0000 (10:32 -0500)]
pNFS: Ensure nfs4_layoutget_prepare returns the correct error

If we're unable to perform the layoutget due to an invalid open stateid
or a bulk recall, ensure that we return the error so that the caller
can decide on an appropriate action.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS/flexfiles: Ensure we record layoutstats even if RPC is terminated early
Trond Myklebust [Tue, 22 Dec 2015 20:32:00 +0000 (15:32 -0500)]
pNFS/flexfiles: Ensure we record layoutstats even if RPC is terminated early

Currently, we will only record the layoutstats correctly if the
RPC call successfully obtains a slot. If we exit before that
happens, then we may find ourselves starting the busy timer through
the call in ff_layout_(read|write)_prepare_layoutstats, but never stopping it.

The same thing happens if we're doing DA-DS.

The fix is to ensure that we catch these cases in the rpc_release()
callback.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS: Add flag to track if we've called nfs4_ff_layout_stat_io_start_read/write
Trond Myklebust [Tue, 22 Dec 2015 17:30:24 +0000 (12:30 -0500)]
pNFS: Add flag to track if we've called nfs4_ff_layout_stat_io_start_read/write

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS/flexfiles: Fix a statistics gathering imbalance
Trond Myklebust [Thu, 17 Dec 2015 14:22:15 +0000 (09:22 -0500)]
pNFS/flexfiles: Fix a statistics gathering imbalance

When we replay a failed read, write or commit to the dataserver, we
need to ensure that we call ff_layout_read_prepare_v3(),
ff_layout_write_prepare_v3 or ff_layout_commit_prepare_v3() so that we
reset the statistics.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS/flexfiles: Don't mark the entire layout as failed, when returning it
Trond Myklebust [Tue, 15 Dec 2015 16:15:05 +0000 (11:15 -0500)]
pNFS/flexfiles: Don't mark the entire layout as failed, when returning it

In pNFS/flexfiles, we want to return the layout without necessarily marking
it as having completely failed. We therefore move the call to
pnfs_layout_io_set_failed() out of pnfs_error_mark_layout_for_return(),
and then ensura that pNFS/files layout calls it separately.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS/flexfiles: Don't prevent flexfiles client from retrying LAYOUTGET
Trond Myklebust [Mon, 14 Dec 2015 21:25:11 +0000 (16:25 -0500)]
pNFS/flexfiles: Don't prevent flexfiles client from retrying LAYOUTGET

Fix a bug in which flexfiles clients are falling back to I/O through the
MDS even when the FF_FLAGS_NO_IO_THRU_MDS flag is set.

The flexfiles client will always report errors through the LAYOUTRETURN
and/or LAYOUTERROR mechanisms, so it should normally be safe for it
to retry the LAYOUTGET until it fails or succeeds.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopnfs/flexfiles: count io stat in rpc_count_stats callback
Peng Tao [Mon, 7 Dec 2015 23:33:14 +0000 (18:33 -0500)]
pnfs/flexfiles: count io stat in rpc_count_stats callback

If client ever restarts IO due to some errors, we'll endup
mis-counting IO stats if we do the counting in .rpc_done
callback. Move it to .rpc_count_stats callback that is only
called when releasing RPC.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopnfs/flexfiles: do not mark delay-like status as DS failure
Peng Tao [Mon, 7 Dec 2015 22:31:38 +0000 (17:31 -0500)]
pnfs/flexfiles: do not mark delay-like status as DS failure

We just need to delay and retry in these cases.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS41: map NFS4ERR_LAYOUTUNAVAILABLE to ENODATA
Peng Tao [Sat, 5 Dec 2015 09:01:01 +0000 (17:01 +0800)]
NFS41: map NFS4ERR_LAYOUTUNAVAILABLE to ENODATA

Instead of mapping it to EIO that is a fatal error and
fails application. We'll go inband after getting
NFS4ERR_LAYOUTUNAVAILABLE.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: only remove page from mapping if launder_page fails
Peng Tao [Sat, 5 Dec 2015 08:20:43 +0000 (16:20 +0800)]
nfs: only remove page from mapping if launder_page fails

Instead of dropping pages when write fails, only do it when
we get fatal failure in launder_page write back.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: handle request add failure properly
Peng Tao [Sat, 5 Dec 2015 07:57:31 +0000 (15:57 +0800)]
nfs: handle request add failure properly

When we fail to queue a read page to IO descriptor,
we need to clean it up otherwise it is hanging around
preventing nfs module from being removed.

When we fail to queue a write page to IO descriptor,
we need to clean it up and also save the failure status
to open context. Then at file close, we can try to write
pages back again and drop the page if it fails to writeback
in .launder_page, which will be done in the next patch.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: centralize pgio error cleanup
Peng Tao [Fri, 4 Dec 2015 18:03:17 +0000 (02:03 +0800)]
nfs: centralize pgio error cleanup

In case we fail during setting things up for read/write IO, set
pg_error in IO descriptor and do the cleanup in nfs_pageio_add_request,
where we clean up all pages that are still hanging around on the IO
descriptor.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: clean up rest of reqs when failing to add one
Peng Tao [Fri, 4 Dec 2015 17:59:56 +0000 (01:59 +0800)]
nfs: clean up rest of reqs when failing to add one

If we fail to set up things before sending anything over wire,
we need to clean up the reqs that are still attached to the
IO descriptor.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS41: pop some layoutget errors to application
Peng Tao [Thu, 3 Dec 2015 18:57:48 +0000 (02:57 +0800)]
NFS41: pop some layoutget errors to application

For ERESTARTSYS/EIO/EROFS/ENOSPC/E2BIG in layoutget, we
should just bail out instead of hiding the error and
retrying inband IO.

Change all the call sites to pop the error all the way up.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS/flexfiles: Support server-supplied layoutstats sampling period
Trond Myklebust [Mon, 16 Nov 2015 16:26:07 +0000 (11:26 -0500)]
pNFS/flexfiles: Support server-supplied layoutstats sampling period

Some servers want to be able to control the frequency with which clients
report layoutstats, for instance, in order to monitor QoS for a particular
file or set of file. In order to support this, the flexfiles layout allows
the server to pass this info as a hint in the layout payload.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS: Flush reclaim writes using FLUSH_COND_STABLE
Trond Myklebust [Mon, 28 Dec 2015 18:34:59 +0000 (13:34 -0500)]
NFS: Flush reclaim writes using FLUSH_COND_STABLE

If there are already writes queued up for commit, then don't flush
just this page even if it is a reclaim issue.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS: Background flush should not be low priority
Trond Myklebust [Mon, 28 Dec 2015 18:30:42 +0000 (13:30 -0500)]
NFS: Background flush should not be low priority

Background flush is needed in order to satisfy the global page limits.
Don't subvert by reducing the priority.
This should also address a write starvation issue that was reported by
Neil Brown.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4.1/pnfs: Fixup an lo->plh_block_lgets imbalance in layoutreturn
Trond Myklebust [Mon, 28 Dec 2015 16:27:15 +0000 (11:27 -0500)]
NFSv4.1/pnfs: Fixup an lo->plh_block_lgets imbalance in layoutreturn

Since commit 2d8ae84fbc32, nothing is bumping lo->plh_block_lgets in the
layoutreturn path, so it should not be touched in nfs4_layoutreturn_release
either.

Fixes: 2d8ae84fbc32 ("NFSv4.1/pnfs: Remove redundant lo->plh_block_lgets...")
Cc: stable@vger.kernel.org # 4.3+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4: Don't perform cached access checks before we've OPENed the file
Trond Myklebust [Sun, 27 Dec 2015 02:54:58 +0000 (21:54 -0500)]
NFSv4: Don't perform cached access checks before we've OPENed the file

Donald Buczek reports that a nfs4 client incorrectly denies
execute access based on outdated file mode (missing 'x' bit).
After the mode on the server is 'fixed' (chmod +x) further execution
attempts continue to fail, because the nfs ACCESS call updates
the access parameter but not the mode parameter or the mode in
the inode.

The root cause is ultimately that the VFS is calling may_open()
before the NFS client has a chance to OPEN the file and hence revalidate
the access and attribute caches.

Al Viro suggests:
>>> Make nfs_permission() relax the checks when it sees MAY_OPEN, if you know
>>> that things will be caught by server anyway?
>>
>> That can work as long as we're guaranteed that everything that calls
>> inode_permission() with MAY_OPEN on a regular file will also follow up
>> with a vfs_open() or dentry_open() on success. Is this always the
>> case?
>
> 1) in do_tmpfile(), followed by do_dentry_open() (not reachable by NFS since
> it doesn't have ->tmpfile() instance anyway)
>
> 2) in atomic_open(), after the call of ->atomic_open() has succeeded.
>
> 3) in do_last(), followed on success by vfs_open()
>
> That's all.  All calls of inode_permission() that get MAY_OPEN come from
> may_open(), and there's no other callers of that puppy.

Reported-by: Donald Buczek <buczek@molgen.mpg.de>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=109771
Link: http://lkml.kernel.org/r/1451046656-26319-1-git-send-email-buczek@molgen.mpg.de
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoSUNRPC: drop unused xs_reclassify_socketX() helpers
Stefan Hajnoczi [Wed, 2 Dec 2015 06:17:52 +0000 (14:17 +0800)]
SUNRPC: drop unused xs_reclassify_socketX() helpers

xs_reclassify_socket4() and friends used to be called directly.
xs_reclassify_socket() is called instead nowadays.

The xs_reclassify_socketX() helper functions are empty when
CONFIG_DEBUG_LOCK_ALLOC is not defined.  Drop them since they have no
callers.

Note that AF_LOCAL still calls xs_reclassify_socketu() directly but is
easily converted to generic xs_reclassify_socket().

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: machine credential support for additional operations
Andrew Elble [Wed, 2 Dec 2015 14:39:51 +0000 (09:39 -0500)]
nfs: machine credential support for additional operations

Allow LAYOUTRETURN and DELEGRETURN to use machine credentials if the
server supports it. Add request for OPEN_DOWNGRADE as the close path
also uses that.

Signed-off-by: Andrew Elble <aweits@rit.edu>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: do not initialise statics to 0
Wei Tang [Fri, 4 Dec 2015 08:06:57 +0000 (16:06 +0800)]
nfs: do not initialise statics to 0

This patch fixes the checkpatch.pl error to nfs4sysctl.c:

ERROR: do not initialise statics to 0

Signed-off-by: Wei Tang <tangwei@cmss.chinamobile.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agopNFS: Modify pnfs_update_layout tracepoints to use layout stateid
Trond Myklebust [Sat, 26 Dec 2015 23:03:07 +0000 (18:03 -0500)]
pNFS: Modify pnfs_update_layout tracepoints to use layout stateid

Instead of displaying a layout segment pointer in these tracepoints,
let's use the layout stateid, now that Olga gave us a set of tools for
displaying them.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFSv4: Fix unused variable warnings in nfs4_init_*_client_string()
Trond Myklebust [Thu, 8 Oct 2015 15:33:17 +0000 (11:33 -0400)]
NFSv4: Fix unused variable warnings in nfs4_init_*_client_string()

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: add new tracepoint for pnfs_update_layout
Jeff Layton [Thu, 10 Dec 2015 15:41:58 +0000 (10:41 -0500)]
nfs: add new tracepoint for pnfs_update_layout

pnfs_update_layout is really the "nexus" of layout handling. If it
returns NULL then we end up going through the MDS. This patch adds
some tracepoints to that function that allow us to determine the
cause when we end up going through the MDS unexpectedly.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoAdding tracepoint to cached open
Olga Kornievskaia [Tue, 24 Nov 2015 18:29:42 +0000 (13:29 -0500)]
Adding tracepoint to cached open

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoAdding stateid information to tracepoints
Olga Kornievskaia [Tue, 24 Nov 2015 18:29:41 +0000 (13:29 -0500)]
Adding stateid information to tracepoints

Operations to which stateid information is added:
close, delegreturn, open, read, setattr, layoutget, layoutcommit, test_stateid,
write, lock, locku, lockt

Format is "stateid=<seqid>:<crc32 hash stateid.other>", also "openstateid=",
"layoutstateid=", and "lockstateid=" for open_file, layoutget, set_lock
tracepoints.

New function is added to internal.h, nfs_stateid_hash(), to compute the hash

trace_nfs4_setattr() is moved from nfs4_do_setattr() to _nfs4_do_setattr()
to get access to stateid.

trace_nfs4_setattr and trace_nfs4_delegreturn are changed from INODE_EVENT
to new event type, INODE_STATEID_EVENT which is same as INODE_EVENT but adds
stateid information

for locking tracepoints, moved trace_nfs4_set_lock() into _nfs4_do_setlk()
to get access to stateid information, and removed trace_nfs4_lock_reclaim(),
trace_nfs4_lock_expired() as they call into _nfs4_do_setlk() and both were
previously same LOCK_EVENT type.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoNFS: Allow the combination pNFS and labeled NFS
Trond Myklebust [Sat, 26 Dec 2015 20:06:03 +0000 (15:06 -0500)]
NFS: Allow the combination pNFS and labeled NFS

Fix the nfs4_pnfs_open_bitmap so that it also allows for labeled NFS.

Signed-off-by: Trond Myklebust <trond,myklebust@primarydata.com>
8 years agoNFS42: handle layoutstats stateid error
Peng Tao [Mon, 7 Dec 2015 01:55:09 +0000 (20:55 -0500)]
NFS42: handle layoutstats stateid error

When server returns layoutstats stateid error, we should
invalidate client's layout so that next IO can trigger new
layoutget.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: Fix race in __update_open_stateid()
Andrew Elble [Wed, 2 Dec 2015 14:20:57 +0000 (09:20 -0500)]
nfs: Fix race in __update_open_stateid()

We've seen this in a packet capture - I've intermixed what I
think was going on. The fix here is to grab the so_lock sooner.

1964379 -> #1 open (for write) reply seqid=1
1964393 -> #2 open (for read) reply seqid=2

  __nfs4_close(), state->n_wronly--
  nfs4_state_set_mode_locked(), changes state->state = [R]
  state->flags is [RW]
  state->state is [R], state->n_wronly == 0, state->n_rdonly == 1

1964398 -> #3 open (for write) call -> because close is already running
1964399 -> downgrade (to read) call seqid=2 (close of #1)
1964402 -> #3 open (for write) reply seqid=3

 __update_open_stateid()
   nfs_set_open_stateid_locked(), changes state->flags
   state->flags is [RW]
   state->state is [R], state->n_wronly == 0, state->n_rdonly == 1
   new sequence number is exposed now via nfs4_stateid_copy()

   next step would be update_open_stateflags(), pending so_lock

1964403 -> downgrade reply seqid=2, fails with OLD_STATEID (close of #1)

   nfs4_close_prepare() gets so_lock and recalcs flags -> send close

1964405 -> downgrade (to read) call seqid=3 (close of #1 retry)

   __update_open_stateid() gets so_lock
 * update_open_stateflags() updates state->n_wronly.
   nfs4_state_set_mode_locked() updates state->state

   state->flags is [RW]
   state->state is [RW], state->n_wronly == 1, state->n_rdonly == 1

 * should have suppressed the preceding nfs4_close_prepare() from
   sending open_downgrade

1964406 -> write call
1964408 -> downgrade (to read) reply seqid=4 (close of #1 retry)

   nfs_clear_open_stateid_locked()
   state->flags is [R]
   state->state is [RW], state->n_wronly == 1, state->n_rdonly == 1

1964409 -> write reply (fails, openmode)

Signed-off-by: Andrew Elble <aweits@rit.edu>
Cc: stable@vger,kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: fix missing assignment in nfs4_sequence_done tracepoint
Andrew Elble [Wed, 2 Dec 2015 14:19:43 +0000 (09:19 -0500)]
nfs: fix missing assignment in nfs4_sequence_done tracepoint

status_flags not set

Signed-off-by: Andrew Elble <aweits@rit.edu>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoLinux 4.4-rc7 v4.4-rc7
Linus Torvalds [Mon, 28 Dec 2015 02:17:37 +0000 (18:17 -0800)]
Linux 4.4-rc7

8 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Mon, 28 Dec 2015 02:12:21 +0000 (18:12 -0800)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:

 - Fix bitrot in __get_user_unaligned()
 - EVA userspace accessor bug fixes.
 - Fix for build issues with certain toolchains.
 - Fix build error for VDSO with particular toolchain versions.
 - Fix build error due to a variable that should have been removed by an
   earlier patch

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: Fix bitrot in __get_user_unaligned()
  MIPS: Fix build error due to unused variables.
  MIPS: VDSO: Fix build error
  MIPS: CPS: drop .set mips64r2 directives
  MIPS: uaccess: Take EVA into account in [__]clear_user
  MIPS: uaccess: Take EVA into account in __copy_from_user()
  MIPS: uaccess: Fix strlen_user with EVA

8 years agoMerge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Mon, 28 Dec 2015 02:06:31 +0000 (18:06 -0800)]
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A smallish set of fixes that we've been sitting on for a while now,
  flushing the queue here so they go in.  Summary:

  A handful of fixes for OMAP, i.MX, Allwinner and Tegra:

   - A clock rate and a PHY setup fix for i.MX6Q/DL
   - A couple of fixes for the reduced serial bus (sunxi-rsb) on
     Allwinner
   - UART wakeirq fix for an OMAP4 board, timer config fixes for AM43XX.
   - Suspend fix for Tegra124 Chromebooks
   - Fix for missing implicit include that's different between
     ARM/ARM64"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: tegra: Fix suspend hang on Tegra124 Chromebooks
  bus: sunxi-rsb: Fix peripheral IC mapping runtime address
  bus: sunxi-rsb: Fix primary PMIC mapping hardware address
  ARM: dts: Fix UART wakeirq for omap4 duovero parlor
  ARM: OMAP2+: AM43xx: select ARM TWD timer
  ARM: OMAP2+: am43xx: enable GENERIC_CLOCKEVENTS_BROADCAST
  fsl-ifc: add missing include on ARM64
  ARM: dts: imx6: Fix Ethernet PHY mode on Ventana boards
  ARM: dts: imx: Fix the assigned-clock mismatch issue on imx6q/dl
  bus: sunxi-rsb: unlock on error in sunxi_rsb_read()
  ARM: dts: sunxi: sun6i-a31s-primo81.dts: add touchscreen axis swapping property

8 years agoMIPS: Fix bitrot in __get_user_unaligned()
Al Viro [Fri, 25 Dec 2015 17:09:30 +0000 (12:09 -0500)]
MIPS: Fix bitrot in __get_user_unaligned()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMerge tag 'pm+acpi-4.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Sun, 27 Dec 2015 04:08:47 +0000 (20:08 -0800)]
Merge tag 'pm+acpi-4.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management and ACPI fixes from Rafael Wysocki:
 "These fix an ACPI processor driver regression introduced during the
  4.3 cycle and a mistake in the recently added SCPI support in the
  arm_big_little cpufreq driver.

  Specifics:

   - Fix a thermal management issue introduced by an ACPI processor
     driver change made during the 4.3 development cycle that failed to
     return 0 from a function on success which triggered an error
     cleanup path every time it had been called that deleted useful data
     structures created previously (Srinivas Pandruvada).

   - Fix a variable data type issue in the arm_big_little cpufreq
     driver's SCPI support code added recently that prevents error
     handling in there from working correctly (Dan Carpenter)"

* tag 'pm+acpi-4.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: scpi-cpufreq: signedness bug in scpi_get_dvfs_info()
  ACPI / processor: Fix thermal cooling device regression

8 years agoMerge tag 'md/4.4-rc6-fix' of git://neil.brown.name/md
Linus Torvalds [Sun, 27 Dec 2015 04:04:25 +0000 (20:04 -0800)]
Merge tag 'md/4.4-rc6-fix' of git://neil.brown.name/md

Pull md bugfix from Neil Brown:
 "One more md fix for 4.4-rc

  Fix a regression which causes reshape to not start properly sometimes"

* tag 'md/4.4-rc6-fix' of git://neil.brown.name/md:
  md: remove check for MD_RECOVERY_NEEDED in action_store.

8 years agoMerge tag 'upstream-4.4-rc7' of git://git.infradead.org/linux-ubifs
Linus Torvalds [Sun, 27 Dec 2015 03:55:16 +0000 (19:55 -0800)]
Merge tag 'upstream-4.4-rc7' of git://git.infradead.org/linux-ubifs

Pull UBI bug fixes from Richard Weinberger:
 "This contains four bug fixes for UBI"

* tag 'upstream-4.4-rc7' of git://git.infradead.org/linux-ubifs:
  mtd: ubi: don't leak e if schedule_erase() fails
  mtd: ubi: fixup error correction in do_sync_erase()
  UBI: fix use of "VID" vs. "EC" in header self-check
  UBI: fix return error code

8 years agoMerge tag 'trace-v4.4-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
Linus Torvalds [Sun, 27 Dec 2015 03:48:09 +0000 (19:48 -0800)]
Merge tag 'trace-v4.4-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull ftrace/recordmcount fix from Steven Rostedt:
 "Russell King was reporting lots of warnings when he compiled his
  kernel with ftrace enabled.  With some investigation it was discovered
  that it was his compile setup.  He was using ccache with hard links,
  which allowed recordmcount to process the same .o twice.  When this
  happens, recordmcount will detect that it was already done and give a
  warning about it.

  Russell fixed this by having recordmcount detect that the object file
  has more than one hard link, and if it does, it unlinks the object
  file after it maps it and processes then.  This appears to fix the
  issue.

  As you did not like the fact that recordmcount modified the file in
  place and thought that it should do the modifications in memory and
  then write it out to disk and move it over the old file to prevent
  other more subtle issues like the one above, a second patch is added
  on top of Russell's to do just that.  Luckily the original code had
  write and lseek wrappers that I was able to modify to not do inplace
  writes, but simply keep track of the changes made in memory.  When a
  write is made, a "update" flag is set, and at the end of processing,
  if the update is set, then it writes the file with changes out to a
  new file, and then renames it over the original one.

  The file descriptor is still passed to the write and lseek wrappers
  because removing that would cause the change to be more intrusive.
  That can be removed in a follow up cleanup patch that can wait till
  the next merge window"

* tag 'trace-v4.4-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ftrace/scripts: Have recordmcount copy the object file
  scripts: recordmcount: break hardlinks

8 years agoMerge tag 'arc-4.4-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Linus Torvalds [Sat, 26 Dec 2015 22:58:06 +0000 (14:58 -0800)]
Merge tag 'arc-4.4-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:
 "Sorry for this late pull request, but these are all important fixes
  for code introduced/updated in this release which we will otherwise
  end up back porting.

   - Unwinder rework (A revert followed by better fix)
   - Build errors: MMUv2, modules with -Os
   - highmem section mismatch build splat"

* tag 'arc-4.4-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: dw2 unwind: Catch Dwarf SNAFUs early
  ARC: dw2 unwind: Don't bail for CIE.version != 1
  Revert "ARC: dw2 unwind: Ignore CIE version !=1 gracefully instead of bailing"
  ARC: Fix linking errors with CONFIG_MODULE + CONFIG_CC_OPTIMIZE_FOR_SIZE
  ARC: mm: fix building for MMU v2
  ARC: mm: HIGHMEM: Fix section mismatch splat

8 years agoMerge branches 'acpi-processor' and 'pm-cpufreq'
Rafael J. Wysocki [Sat, 26 Dec 2015 21:20:24 +0000 (22:20 +0100)]
Merge branches 'acpi-processor' and 'pm-cpufreq'

* acpi-processor:
  ACPI / processor: Fix thermal cooling device regression

* pm-cpufreq:
  cpufreq: scpi-cpufreq: signedness bug in scpi_get_dvfs_info()

8 years agoMerge branch 'parisc-4.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Fri, 25 Dec 2015 21:19:50 +0000 (13:19 -0800)]
Merge branch 'parisc-4.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc system call restart fix from Helge Deller:
 "The architectural design of parisc always uses two instructions to
  call kernel syscalls (delayed branch feature).  This means that the
  instruction following the branch (located in the delay slot of the
  branch instruction) is executed before control passes to the branch
  destination.

  Depending on which assembler instruction and how it is used in
  usersapce in the delay slot, this sometimes made restarted syscalls
  like futex() and poll() failing with -ENOSYS"

* 'parisc-4.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Fix syscall restarts

8 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Fri, 25 Dec 2015 21:15:23 +0000 (13:15 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:

 1) Finally make perf stack backtraces stable on sparc, several problems
    (mostly due to the context in which the user copies from the stack
    are done) contributed to this.

    From Rob Gardner.

 2) Export ADI capability if the cpu supports it.

 3) Hook up userfaultfd system call.

 4) When faults happen during user copies we really have to clean up and
    restore the FPU state fully.  Also from Rob Gardner

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  tty/serial: Skip 'NULL' char after console break when sysrq enabled
  sparc64: fix FP corruption in user copy functions
  sparc64: Perf should save/restore fault info
  sparc64: Ensure perf can access user stacks
  sparc64: Don't set %pil in rtrap_nmi too early
  sparc64: Add ADI capability to cpu capabilities
  tty: serial: constify sunhv_ops structs
  sparc: Hook up userfaultfd system call

8 years agotty/serial: Skip 'NULL' char after console break when sysrq enabled
Vijay Kumar [Wed, 23 Dec 2015 18:55:33 +0000 (10:55 -0800)]
tty/serial: Skip 'NULL' char after console break when sysrq enabled

When sysrq is triggered from console, serial driver for SUN hypervisor
console receives a console break and enables the sysrq. It expects a valid
sysrq char following with break. Meanwhile if driver receives 'NULL'
ASCII char then it disables sysrq and sysrq handler will never be invoked.

This fix skips calling uart sysrq handler when 'NULL' is received while
sysrq is enabled.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Acked-by: Karl Volz <karl.volz@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agosparc64: fix FP corruption in user copy functions
Rob Gardner [Wed, 23 Dec 2015 06:24:49 +0000 (23:24 -0700)]
sparc64: fix FP corruption in user copy functions

Short story: Exception handlers used by some copy_to_user() and
copy_from_user() functions do not diligently clean up floating point
register usage, and this can result in a user process seeing invalid
values in floating point registers. This sometimes makes the process
fail.

Long story: Several cpu-specific (NG4, NG2, U1, U3) memcpy functions
use floating point registers and VIS alignaddr/faligndata to
accelerate data copying when source and dest addresses don't align
well. Linux uses a lazy scheme for saving floating point registers; It
is not done upon entering the kernel since it's a very expensive
operation. Rather, it is done only when needed. If the kernel ends up
not using FP regs during the course of some trap or system call, then
it can return to user space without saving or restoring them.

The various memcpy functions begin their FP code with VISEntry (or a
variation thereof), which saves the FP regs. They conclude their FP
code with VISExit (or a variation) which essentially marks the FP regs
"clean", ie, they contain no unsaved values. fprs.FPRS_FEF is turned
off so that a lazy restore will be triggered when/if the user process
accesses floating point regs again.

The bug is that the user copy variants of memcpy, copy_from_user() and
copy_to_user(), employ an exception handling mechanism to detect faults
when accessing user space addresses, and when this handler is invoked,
an immediate return from the function is forced, and VISExit is not
executed, thus leaving the fprs register in an indeterminate state,
but often with fprs.FPRS_FEF set and one or more dirty bits. This
results in a return to user space with invalid values in the FP regs,
and since fprs.FPRS_FEF is on, no lazy restore occurs.

This bug affects copy_to_user() and copy_from_user() for NG4, NG2,
U3, and U1. All are fixed by using a new exception handler for those
loads and stores that are done during the time between VISEnter and
VISExit.

n.b. In NG4memcpy, the problematic code can be triggered by a copy
size greater than 128 bytes and an unaligned source address.  This bug
is known to be the cause of random user process memory corruptions
while perf is running with the callgraph option (ie, perf record -g).
This occurs because perf uses copy_from_user() to read user stacks,
and may fault when it follows a stack frame pointer off to an
invalid page. Validation checks on the stack address just obscure
the underlying problem.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agosparc64: Perf should save/restore fault info
Rob Gardner [Wed, 23 Dec 2015 04:16:07 +0000 (21:16 -0700)]
sparc64: Perf should save/restore fault info

There have been several reports of random processes being killed with
a bus error or segfault during userspace stack walking in perf.  One
of the root causes of this problem is an asynchronous modification to
thread_info fault_address and fault_code, which stems from a perf
counter interrupt arriving during kernel processing of a "benign"
fault, such as a TSB miss. Since perf_callchain_user() invokes
copy_from_user() to read user stacks, a fault is not only possible,
but probable. Validity checks on the stack address merely cover up the
problem and reduce its frequency.

The solution here is to save and restore fault_address and fault_code
in perf_callchain_user() so that the benign fault handler is not
disturbed by a perf interrupt.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agosparc64: Ensure perf can access user stacks
Rob Gardner [Wed, 23 Dec 2015 04:16:06 +0000 (21:16 -0700)]
sparc64: Ensure perf can access user stacks

When an interrupt (such as a perf counter interrupt) is delivered
while executing in user space, the trap entry code puts ASI_AIUS in
%asi so that copy_from_user() and copy_to_user() will access the
correct memory. But if a perf counter interrupt is delivered while the
cpu is already executing in kernel space, then the trap entry code
will put ASI_P in %asi, and this will prevent copy_from_user() from
reading any useful stack data in either of the perf_callchain_user_X
functions, and thus no user callgraph data will be collected for this
sample period. An additional problem is that a fault is guaranteed
to occur, and though it will be silently covered up, it wastes time
and could perturb state.

In perf_callchain_user(), we ensure that %asi contains ASI_AIUS
because we know for a fact that the subsequent calls to
copy_from_user() are intended to read the user's stack.

[ Use get_fs()/set_fs() -DaveM ]

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agosparc64: Don't set %pil in rtrap_nmi too early
Rob Gardner [Tue, 22 Dec 2015 04:48:03 +0000 (21:48 -0700)]
sparc64: Don't set %pil in rtrap_nmi too early

Commit 28a1f53 delays setting %pil to avoid potential
hardirq stack overflow in the common rtrap_irq path.
Setting %pil also needs to be delayed in the rtrap_nmi
path for the same reason.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agosparc64: Add ADI capability to cpu capabilities
Khalid Aziz [Thu, 17 Dec 2015 17:33:50 +0000 (10:33 -0700)]
sparc64: Add ADI capability to cpu capabilities

Add ADI (Application Data Integrity) capability to cpu capabilities list.
ADI capability allows virtual addresses to be encoded with a tag in
bits 63-60. This tag serves as an access control key for the regions
of virtual address with ADI enabled and a key set on them. Hypervisor
encodes this capability as "adp" in "hwcap-list" property in machine
description.

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agotty: serial: constify sunhv_ops structs
Aya Mahfouz [Mon, 14 Dec 2015 23:37:57 +0000 (01:37 +0200)]
tty: serial: constify sunhv_ops structs

Constifies sunhv_ops structures in tty's serial
driver since they are not modified after their
initialization.

Detected and found using Coccinelle.

Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agocpufreq: scpi-cpufreq: signedness bug in scpi_get_dvfs_info()
Dan Carpenter [Tue, 15 Dec 2015 11:16:44 +0000 (11:16 +0000)]
cpufreq: scpi-cpufreq: signedness bug in scpi_get_dvfs_info()

The "domain" variable needs to be signed for the error handling to work.

Fixes: 8def31034d03 (cpufreq: arm_big_little: add SCPI interface driver)
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agosparc: Hook up userfaultfd system call
Mike Kravetz [Fri, 20 Nov 2015 23:54:06 +0000 (15:54 -0800)]
sparc: Hook up userfaultfd system call

After hooking up system call, userfaultfd selftest was successful for
both 32 and 64 bit version of test.

Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge tag 'sound-4.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Wed, 23 Dec 2015 18:28:39 +0000 (10:28 -0800)]
Merge tag 'sound-4.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This shouldn't be a nightmare before Christmas: just a handful small
  device-specific fixes for various ASoC and HD-audio drivers.  Most of
  them are stable fixes"

* tag 'sound-4.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2)
  ASoC: fsl_sai: fix no frame clk in master mode
  ALSA: hda - Set SKL+ hda controller power at freeze() and thaw()
  ASoC: sgtl5000: fix VAG power up timing
  ASoC: rockchip: spdif: Set transmit data level to 16 samples
  ASoC: wm8974: set cache type for regmap
  ASoC: es8328: Fix shifts for mixer switches
  ASoC: davinci-mcasp: Fix XDATA check in mcasp_start_tx
  ASoC: es8328: Fix deemphasis values

8 years agoMerge tag 'drm-intel-fixes-2015-12-23' of git://anongit.freedesktop.org/drm-intel
Linus Torvalds [Wed, 23 Dec 2015 18:22:16 +0000 (10:22 -0800)]
Merge tag 'drm-intel-fixes-2015-12-23' of git://anongit.freedesktop.org/drm-intel

Pull i915 drm fixes from Jani Nikula:
 "Here's a batch of i915 fixes all around.  It may be slightly bigger
  than one would hope for at this stage, but they've all been through
  testing in our -next before being picked up for v4.4.  Also, I missed
  Dave's fixes pull earlier today just because I wanted an extra testing
  round on this.  So I'm fairly confident.

  Wishing you all the things it is customary to wish this time of the
  year"

* tag 'drm-intel-fixes-2015-12-23' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Correct max delay for HDMI hotplug live status checking
  drm/i915: mdelay(10) considered harmful
  drm/i915: Kill intel_crtc->cursor_bo
  drm/i915: Workaround CHV pipe C cursor fail
  drm/i915: Only spin whilst waiting on the current request
  drm/i915: Limit the busy wait on requests to 5us not 10ms!
  drm/i915: Break busywaiting for requests on pending signals
  drm/i915: Disable primary plane if we fail to reconstruct BIOS fb (v2)
  drm/i915: Set the map-and-fenceable flag for preallocated objects
  drm/i915: Drop the broken cursor base==0 special casing

8 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 23 Dec 2015 18:11:12 +0000 (10:11 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Not much happening, should have dequeued this lot earlier.

  One amdgpu, one nouveau and one exynos fix"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/exynos: atomic check only enabled crtc states
  drm/nouveau/bios/fan: hardcode the fan mode to linear
  drm/amdgpu: fix user fence handling

8 years agoMerge tag 'asoc-fix-v4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Takashi Iwai [Wed, 23 Dec 2015 07:30:28 +0000 (08:30 +0100)]
Merge tag 'asoc-fix-v4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.4

A collection of small driver specific fixes here, nothing that'll affect
users who don't have the devices concerned.  At least the wm8974 bug
indicates that there's not too many users of some of these devices.

8 years agoMerge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/es8328', 'asoc/fix/fsl...
Mark Brown [Wed, 23 Dec 2015 00:23:27 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/es8328', 'asoc/fix/fsl-sai', 'asoc/fix/rockchip', 'asoc/fix/sgtl5000' and 'asoc/fix/wm8974' into asoc-linus

8 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Wed, 23 Dec 2015 00:00:25 +0000 (16:00 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block layer fixes from Jens Axboe:
 "Three small fixes for 4.4 final. Specifically:

   - The segment issue fix from Junichi, where the old IO path does a
     bio limit split before potentially bouncing the pages.  We need to
     do that in the right order, to ensure that limitations are met.

   - A NVMe surprise removal IO hang fix from Keith.

   - A use-after-free in null_blk, introduced by a previous patch in
     this series.  From Mike Krinkin"

* 'for-linus' of git://git.kernel.dk/linux-block:
  null_blk: fix use-after-free error
  block: ensure to split after potentially bouncing a bio
  NVMe: IO ending fixes on surprise removal

8 years agoMerge tag 'nfsd-4.4-1' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Tue, 22 Dec 2015 23:52:32 +0000 (15:52 -0800)]
Merge tag 'nfsd-4.4-1' of git://linux-nfs.org/~bfields/linux

Pull nfsd fix from Bruce Fields:
 "Just one fix for a NFSv4 callback bug introduced in 4.4"

* tag 'nfsd-4.4-1' of git://linux-nfs.org/~bfields/linux:
  nfsd: don't hold ls_mutex across a layout recall

8 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Tue, 22 Dec 2015 23:47:39 +0000 (15:47 -0800)]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:

 - A series of fixes to the MTRR emulation, tested in the BZ by several
   users so they should be safe this late

 - A fix for a division by zero

 - Two very simple ARM and PPC fixes

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: Reload pit counters for all channels when restoring state
  KVM: MTRR: treat memory as writeback if MTRR is disabled in guest CPUID
  KVM: MTRR: observe maxphyaddr from guest CPUID, not host
  KVM: MTRR: fix fixed MTRR segment look up
  KVM: VMX: Fix host initiated access to guest MSR_TSC_AUX
  KVM: arm/arm64: vgic: Fix kvm_vgic_map_is_active's dist check
  kvm: x86: move tracepoints outside extended quiescent state
  KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR

8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Tue, 22 Dec 2015 23:43:18 +0000 (15:43 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky:
 "Two late bug fixes for kernel 4.4.

  Merry Christmas"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/dis: Fix handling of format specifiers
  s390/zcrypt: Fix AP queue handling if queue is full

8 years agoARM: tegra: Fix suspend hang on Tegra124 Chromebooks
Jon Hunter [Tue, 8 Dec 2015 10:26:49 +0000 (10:26 +0000)]
ARM: tegra: Fix suspend hang on Tegra124 Chromebooks

Enabling CPUFreq support for Tegra124 Chromebooks is causing the Tegra124
to hang when resuming from suspend.

When CPUFreq is enabled, the CPU clock is changed from the PLLX clock to
the DFLL clock during kernel boot. When resuming from suspend the CPU
clock is temporarily changed back to the PLLX clock before switching back
to the DFLL. If the DFLL is operating at a much lower frequency than the
PLLX when we enter suspend, and so the CPU voltage rail is at a voltage
too low for the CPUs to operate at the PLLX frequency, then the device
will hang.

Please note that the PLLX is used in the resume sequence to switch the CPU
clock from the very slow 32K clock to a faster clock during early resume
to speed up the resume sequence before the DFLL is resumed.

Ideally, we should fix this by setting the suspend frequency so that it
matches the PLLX frequency, however, that would be a bigger change. For
now simply disable CPUFreq support for Tegra124 Chromebooks to avoid the
hang when resuming from suspend.

Fixes: 9a0baee960a7 ("ARM: tegra: Enable CPUFreq support for Tegra124
      Chromebooks")

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
8 years agoMerge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Tue, 22 Dec 2015 23:37:19 +0000 (15:37 -0800)]
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio fix from Michael Tsirkin:
 "This includes a single fix for virtio ccw error handling"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio/s390: handle error values in irb

8 years agoum: Fix pointer cast
Mickaël Salaün [Tue, 22 Dec 2015 20:44:01 +0000 (21:44 +0100)]
um: Fix pointer cast

Fix a pointer cast typo introduced in v4.4-rc5 especially visible for
the i386 subarchitecture where it results in a kernel crash.

[ Also removed pointless cast as per Al Viro - Linus ]

Fixes: 8090bfd2bb9a ("um: Fix fpstate handling")
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Cc: Jeff Dike <jdike@addtoit.com>
Acked-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 years agoMerge tag 'omap-for-v4.4/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Tue, 22 Dec 2015 21:24:29 +0000 (13:24 -0800)]
Merge tag 'omap-for-v4.4/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Few fixes for omaps to allow am437x only builds to boot properly with
CPU_IDLE and ARM TWD timer. This is probably a common configuration setup
for people making products with these SoCs so let's make sure it works.

Also a wakeirq fix for duovero parlor making my life a bit easier as that
allows me to run basic PM regression tests on it.

It would be nice to have these in v4.4, but if it gets too late for that
because of the holidays, it is not super critical if these get merged for
v4.5.

* tag 'omap-for-v4.4/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: Fix UART wakeirq for omap4 duovero parlor
  ARM: OMAP2+: AM43xx: select ARM TWD timer
  ARM: OMAP2+: am43xx: enable GENERIC_CLOCKEVENTS_BROADCAST

Signed-off-by: Olof Johansson <olof@lixom.net>
8 years agoMerge tag 'imx-fixes-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Olof Johansson [Tue, 22 Dec 2015 19:49:21 +0000 (11:49 -0800)]
Merge tag 'imx-fixes-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes

The i.MX fixes for 4.4, 3rd round:
- Fix Ethernet PHY mode on i.MX6 Ventana boards, which can result in
  a non-functional Ethernet when Marvell phy driver rather than generic
  phy driver is selected.
- Fix an assigned-clock configuration bug on imx6qdl-sabreauto board
  which was introduced by commit ed339363de1b ("ARM: dts:
  imx6qdl-sabreauto: Allow HDMI and LVDS to work simultaneously").

* tag 'imx-fixes-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: imx6: Fix Ethernet PHY mode on Ventana boards
  ARM: dts: imx: Fix the assigned-clock mismatch issue on imx6q/dl

8 years agobus: sunxi-rsb: Fix peripheral IC mapping runtime address
Chen-Yu Tsai [Wed, 16 Dec 2015 09:14:46 +0000 (17:14 +0800)]
bus: sunxi-rsb: Fix peripheral IC mapping runtime address

0x4e is the runtime address normally associated with perihperal ICs.
0x45 is not a valid runtime address.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Olof Johansson <olof@lixom.net>