]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Fri, 7 Jun 2013 02:14:11 +0000 (12:14 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'

11 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Fri, 7 Jun 2013 02:12:37 +0000 (12:12 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

11 years agoMerge remote-tracking branch 'i2c/i2c/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 02:11:00 +0000 (12:11 +1000)]
Merge remote-tracking branch 'i2c/i2c/for-next'

11 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 02:09:23 +0000 (12:09 +1000)]
Merge remote-tracking branch 'hid/for-next'

11 years agoMerge remote-tracking branch 'pci/next'
Stephen Rothwell [Fri, 7 Jun 2013 02:05:35 +0000 (12:05 +1000)]
Merge remote-tracking branch 'pci/next'

Conflicts:
drivers/acpi/pci_root.c

11 years agoMerge remote-tracking branch 'xfs/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 02:03:56 +0000 (12:03 +1000)]
Merge remote-tracking branch 'xfs/for-next'

11 years agoMerge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 02:02:19 +0000 (12:02 +1000)]
Merge remote-tracking branch 'v9fs/for-next'

11 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Fri, 7 Jun 2013 02:00:11 +0000 (12:00 +1000)]
Merge remote-tracking branch 'ocfs2/linux-next'

11 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:58:34 +0000 (11:58 +1000)]
Merge remote-tracking branch 'nfsd/nfsd-next'

11 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:54:16 +0000 (11:54 +1000)]
Merge remote-tracking branch 'nfs/linux-next'

11 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Fri, 7 Jun 2013 01:52:21 +0000 (11:52 +1000)]
Merge remote-tracking branch 'logfs/master'

11 years agoMerge remote-tracking branch 'jfs/jfs-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:50:46 +0000 (11:50 +1000)]
Merge remote-tracking branch 'jfs/jfs-next'

11 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Fri, 7 Jun 2013 01:49:13 +0000 (11:49 +1000)]
Merge remote-tracking branch 'gfs2/master'

11 years agoMerge remote-tracking branch 'fscache/fscache'
Stephen Rothwell [Fri, 7 Jun 2013 01:41:04 +0000 (11:41 +1000)]
Merge remote-tracking branch 'fscache/fscache'

11 years agoMerge remote-tracking branch 'f2fs/dev'
Stephen Rothwell [Fri, 7 Jun 2013 01:39:30 +0000 (11:39 +1000)]
Merge remote-tracking branch 'f2fs/dev'

11 years agoMerge remote-tracking branch 'ext4/dev'
Stephen Rothwell [Fri, 7 Jun 2013 01:31:46 +0000 (11:31 +1000)]
Merge remote-tracking branch 'ext4/dev'

11 years agoMerge remote-tracking branch 'ecryptfs/next'
Stephen Rothwell [Fri, 7 Jun 2013 01:30:13 +0000 (11:30 +1000)]
Merge remote-tracking branch 'ecryptfs/next'

11 years agoMerge remote-tracking branch 'cifs/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:28:36 +0000 (11:28 +1000)]
Merge remote-tracking branch 'cifs/for-next'

11 years agoMerge remote-tracking branch 'ceph/testing'
Stephen Rothwell [Fri, 7 Jun 2013 01:27:02 +0000 (11:27 +1000)]
Merge remote-tracking branch 'ceph/testing'

11 years agoMerge remote-tracking branch 'xtensa/for_next'
Stephen Rothwell [Fri, 7 Jun 2013 01:25:28 +0000 (11:25 +1000)]
Merge remote-tracking branch 'xtensa/for_next'

11 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Fri, 7 Jun 2013 01:23:51 +0000 (11:23 +1000)]
Merge remote-tracking branch 'sh/sh-latest'

Conflicts:
arch/sh/kernel/cpu/sh2a/Makefile

11 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Fri, 7 Jun 2013 01:20:12 +0000 (11:20 +1000)]
Merge remote-tracking branch 's390/features'

11 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Fri, 7 Jun 2013 01:18:38 +0000 (11:18 +1000)]
Merge remote-tracking branch 'mpc5xxx/next'

11 years agoMerge remote-tracking branch 'parisc-hd/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:17:03 +0000 (11:17 +1000)]
Merge remote-tracking branch 'parisc-hd/for-next'

11 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:15:29 +0000 (11:15 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

11 years agoMerge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:13:56 +0000 (11:13 +1000)]
Merge remote-tracking branch 'm68k/for-next'

11 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Fri, 7 Jun 2013 01:12:24 +0000 (11:12 +1000)]
Merge remote-tracking branch 'ia64/next'

11 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:10:51 +0000 (11:10 +1000)]
Merge remote-tracking branch 'cris/for-next'

Conflicts:
arch/cris/arch-v32/drivers/Kconfig

11 years agoMerge remote-tracking branch 'arm64/upstream'
Stephen Rothwell [Fri, 7 Jun 2013 01:09:12 +0000 (11:09 +1000)]
Merge remote-tracking branch 'arm64/upstream'

11 years agoMerge remote-tracking branch 'xilinx/arm-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:09:11 +0000 (11:09 +1000)]
Merge remote-tracking branch 'xilinx/arm-next'

Conflicts:
arch/arm/mach-highbank/highbank.c
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-spear/spear13xx.c
arch/arm/mach-vexpress/v2m.c
arch/arm/mach-zynq/platsmp.c
drivers/clocksource/Makefile
drivers/clocksource/tegra20_timer.c

11 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:07:34 +0000 (11:07 +1000)]
Merge remote-tracking branch 'arm/for-next'

11 years agoMerge remote-tracking branch 'arc/for-next'
Stephen Rothwell [Fri, 7 Jun 2013 01:06:02 +0000 (11:06 +1000)]
Merge remote-tracking branch 'arc/for-next'

11 years agoMerge remote-tracking branch 'vfio-fixes/for-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:27 +0000 (11:00 +1000)]
Merge remote-tracking branch 'vfio-fixes/for-linus'

11 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:24 +0000 (11:00 +1000)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

Conflicts:
scripts/Makefile.lib

11 years agoMerge remote-tracking branch 'irqdomain-current/irqdomain/merge'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:22 +0000 (11:00 +1000)]
Merge remote-tracking branch 'irqdomain-current/irqdomain/merge'

11 years agoMerge remote-tracking branch 'ide/master'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:18 +0000 (11:00 +1000)]
Merge remote-tracking branch 'ide/master'

11 years agoMerge remote-tracking branch 'crypto-current/master'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:16 +0000 (11:00 +1000)]
Merge remote-tracking branch 'crypto-current/master'

11 years agoMerge remote-tracking branch 'staging.current/staging-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:11 +0000 (11:00 +1000)]
Merge remote-tracking branch 'staging.current/staging-linus'

11 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:11 +0000 (11:00 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

11 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:10 +0000 (11:00 +1000)]
Merge remote-tracking branch 'tty.current/tty-linus'

11 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:09 +0000 (11:00 +1000)]
Merge remote-tracking branch 'wireless/master'

11 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:08 +0000 (11:00 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

11 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:07 +0000 (11:00 +1000)]
Merge remote-tracking branch 'sound-current/for-linus'

11 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:06 +0000 (11:00 +1000)]
Merge remote-tracking branch 'net/master'

11 years agoMerge remote-tracking branch 'powerpc-merge/merge'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:05 +0000 (11:00 +1000)]
Merge remote-tracking branch 'powerpc-merge/merge'

11 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:04 +0000 (11:00 +1000)]
Merge remote-tracking branch 'm68k-current/for-linus'

11 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:04 +0000 (11:00 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

11 years agoMerge remote-tracking branch 'arc-current/for-curr'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:03 +0000 (11:00 +1000)]
Merge remote-tracking branch 'arc-current/for-curr'

11 years agoMerge branch 'labeled-nfs' into linux-next
Trond Myklebust [Thu, 6 Jun 2013 20:43:29 +0000 (16:43 -0400)]
Merge branch 'labeled-nfs' into linux-next

* labeled-nfs:
  NFS: Add in v4.2 callback operation
  NFS: Make callbacks minor version generic
  Kconfig: Add Kconfig entry for Labeled NFS V4 client
  NFS: Extend NFS xattr handlers to accept the security namespace
  NFS: Client implementation of Labeled-NFS
  NFS: Add label lifecycle management
  NFS:Add labels to client function prototypes
  NFSv4: Extend fattr bitmaps to support all 3 words
  NFSv4: Introduce new label structure
  NFSv4: Add label recommended attribute and NFSv4 flags
  NFSv4.2: Added NFS v4.2 support to the NFS client
  SELinux: Add new labeling type native labels
  LSM: Add flags field to security_sb_set_mnt_opts for in kernel mount data.
  Security: Add Hook to test if the particular xattr is part of a MAC model.
  Security: Add hook to calculate context based on a negative dentry.
  NFS: Add NFSv4.2 protocol constants

Conflicts:
fs/nfs/nfs4proc.c

11 years agoNFS: Add in v4.2 callback operation
Bryan Schumaker [Wed, 5 Jun 2013 15:15:02 +0000 (11:15 -0400)]
NFS: Add in v4.2 callback operation

NFS v4.2 adds a CB_OFFLOAD operation used by COPY and WRITE_PLUS.  Since
neither of these operations have been implemented yet, simply return
NFS4ERR_NOTSUPP.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFS: Make callbacks minor version generic
Bryan Schumaker [Wed, 5 Jun 2013 15:15:01 +0000 (11:15 -0400)]
NFS: Make callbacks minor version generic

I found a few places that hardcode the minor version number rather than
making it dependent on the protocol the callback came in over.  This
patch makes it easier to add new minor versions in the future.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Close another NFSv4 recovery race
Trond Myklebust [Wed, 29 May 2013 17:34:46 +0000 (13:34 -0400)]
NFSv4: Close another NFSv4 recovery race

State recovery currently relies on being able to find a valid
nfs_open_context in the inode->open_files list.
We therefore need to put the nfs_open_context on the list while
we're still protected by the sp->so_reclaim_seqcount in order
to avoid reboot races.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Move dentry instantiation into the NFSv4-specific atomic open code
Trond Myklebust [Wed, 29 May 2013 17:11:28 +0000 (13:11 -0400)]
NFSv4: Move dentry instantiation into the NFSv4-specific atomic open code

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Refactor _nfs4_open_and_get_state to set ctx->state
Trond Myklebust [Wed, 29 May 2013 17:17:04 +0000 (13:17 -0400)]
NFSv4: Refactor _nfs4_open_and_get_state to set ctx->state

Instead of having the callers set ctx->state, do it inside
_nfs4_open_and_get_state.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Cleanup: pass the nfs_open_context to nfs4_do_open
Trond Myklebust [Wed, 29 May 2013 16:37:49 +0000 (12:37 -0400)]
NFSv4: Cleanup: pass the nfs_open_context to nfs4_do_open

All the callers have an open_context at this point, and since we always
need one in order to do state recovery, it makes sense to use it as the
basis for the nfs4_do_open() call.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Remove redundant check for FMODE_EXEC in nfs_finish_open
Trond Myklebust [Wed, 29 May 2013 15:53:29 +0000 (11:53 -0400)]
NFSv4: Remove redundant check for FMODE_EXEC in nfs_finish_open

We already check the EXEC access mode in the lower layers.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Remove redundant call to rpc_set_running() in __rpc_execute()
Trond Myklebust [Wed, 22 May 2013 22:52:18 +0000 (18:52 -0400)]
SUNRPC: Remove redundant call to rpc_set_running() in __rpc_execute()

The RPC_TASK_RUNNING flag will always have been set in rpc_make_runnable()
once we get past the test for out_of_line_wait_on_bit() returning
ERESTARTSYS.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Remove unused functions rpc_task_set/has_priority
Trond Myklebust [Tue, 21 May 2013 22:36:27 +0000 (18:36 -0400)]
SUNRPC: Remove unused functions rpc_task_set/has_priority

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Remove the unused helpers task_for_each() and task_for_first()
Trond Myklebust [Tue, 21 May 2013 16:58:57 +0000 (12:58 -0400)]
SUNRPC: Remove the unused helpers task_for_each() and task_for_first()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Remove unused function rpc_queue_empty
Trond Myklebust [Tue, 21 May 2013 16:51:32 +0000 (12:51 -0400)]
SUNRPC: Remove unused function rpc_queue_empty

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Fix a potential race in rpc_execute
Trond Myklebust [Tue, 21 May 2013 03:00:18 +0000 (23:00 -0400)]
SUNRPC: Fix a potential race in rpc_execute

If the rpc_task is asynchronous, it could theoretically finish executing
on the workqueue it was assigned by rpc_make_runnable() before we get
round to testing RPC_IS_ASYNC() in rpc_execute.

In practice, however, all the existing callers hold a reference to the
rpc_task, so this can't happen today...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Simplify setting the layout header credential
Trond Myklebust [Tue, 21 May 2013 13:26:49 +0000 (09:26 -0400)]
NFSv4.1: Simplify setting the layout header credential

ctx->cred == ctx->state->owner->so_cred, so let's just use the former.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Enable state protection
Trond Myklebust [Mon, 20 May 2013 16:24:03 +0000 (12:24 -0400)]
NFSv4.1: Enable state protection

Use the EXCHGID4_FLAG_BIND_PRINC_STATEID exchange_id flag to enable
stateid protection. This means that if we create a stateid using a
particular principal, then we must use the same principal if we
want to change that state.
IOW: if we OPEN a file using a particular credential, then we have
to use the same credential in subsequent OPEN_DOWNGRADE, CLOSE,
or DELEGRETURN operations that use that stateid.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Use layout credentials for get_deviceinfo calls
Trond Myklebust [Mon, 20 May 2013 15:42:54 +0000 (11:42 -0400)]
NFSv4.1: Use layout credentials for get_deviceinfo calls

This is not strictly needed, since get_deviceinfo is not allowed to
return NFS4ERR_ACCESS or NFS4ERR_WRONG_CRED, but lets do it anyway
for consistency with other pNFS operations.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that test_stateid and free_stateid use correct credentials
Trond Myklebust [Mon, 20 May 2013 15:20:27 +0000 (11:20 -0400)]
NFSv4.1: Ensure that test_stateid and free_stateid use correct credentials

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that reclaim_complete uses the right credential
Trond Myklebust [Mon, 20 May 2013 15:05:17 +0000 (11:05 -0400)]
NFSv4.1: Ensure that reclaim_complete uses the right credential

We want to use the same credential for reclaim_complete as we used
for the exchange_id call.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that layoutreturn uses the correct credential
Trond Myklebust [Mon, 20 May 2013 14:43:47 +0000 (10:43 -0400)]
NFSv4.1: Ensure that layoutreturn uses the correct credential

We need to use the same credential as was used for the layoutget
and/or layoutcommit operations.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that layoutget is called using the layout credential
Trond Myklebust [Mon, 20 May 2013 14:49:34 +0000 (10:49 -0400)]
NFSv4.1: Ensure that layoutget is called using the layout credential

Ensure that we use the same credential for layoutget, layoutcommit and
layoutreturn.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agonet: Unbreak compat_sys_{send,recv}msg
Andy Lutomirski [Wed, 5 Jun 2013 19:38:26 +0000 (19:38 +0000)]
net: Unbreak compat_sys_{send,recv}msg

I broke them in this commit:

    commit 1be374a0518a288147c6a7398792583200a67261
    Author: Andy Lutomirski <luto@amacapital.net>
    Date:   Wed May 22 14:07:44 2013 -0700

        net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg

This patch adds __sys_sendmsg and __sys_sendmsg as common helpers that accept
MSG_CMSG_COMPAT and blocks MSG_CMSG_COMPAT at the syscall entrypoints.  It
also reverts some unnecessary checks in sys_socketcall.

Apparently I was suffering from underscore blindness the first time around.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Tested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoUSB: option,zte_ev: move most ZTE CDMA devices to zte_ev
Dan Williams [Wed, 5 Jun 2013 20:26:27 +0000 (15:26 -0500)]
USB: option,zte_ev: move most ZTE CDMA devices to zte_ev

Per some ZTE Linux drivers I found for the AC2716, the following patch
moves most ZTE CDMA devices from option to zte_ev.  The blacklist stuff
that option does is not required with zte_ev, because it doesn't
implement any of the send_setup hooks which the blacklist suppressed.

I did not move the 2718 over because I could not find any ZTE Linux
drivers for that device, nor even any Windows drivers.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: option: blacklist network interface on Huawei E1820
Bjørn Mork [Thu, 6 Jun 2013 10:57:24 +0000 (12:57 +0200)]
USB: option: blacklist network interface on Huawei E1820

The mode used by Windows for the Huawei E1820 will use the
same ff/ff/ff class codes for both serial and network
functions.

Reported-by: Graham Inggs <graham.inggs@uct.ac.za>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: whiteheat: fix broken port configuration
Johan Hovold [Thu, 6 Jun 2013 11:32:47 +0000 (13:32 +0200)]
USB: whiteheat: fix broken port configuration

When configuring the port (e.g. set_termios) the port minor number
rather than the port number was used in the request (and they only
coincide for minor number 0).

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge branch '3.10-fixes' into mips-for-linux-next
Ralf Baechle [Thu, 6 Jun 2013 14:18:06 +0000 (16:18 +0200)]
Merge branch '3.10-fixes' into mips-for-linux-next

11 years agoMIPS: ralink: add missing SZ_1M multiplier
John Crispin [Thu, 6 Jun 2013 12:55:53 +0000 (12:55 +0000)]
MIPS: ralink: add missing SZ_1M multiplier

On RT5350 the memory size is set to Bytes and not MegaBytes due to a missing
multiplier.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/5378/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Compat: Fix cputime_to_timeval() arguments in compat binfmt_elf.
Ralf Baechle [Tue, 28 May 2013 22:48:10 +0000 (00:48 +0200)]
MIPS: Compat: Fix cputime_to_timeval() arguments in compat binfmt_elf.

cputime_to_timeval() takes a struct timeval *as its second argument but
a struct compat_timeval * will be passed resulting in:

  CC      arch/mips/kernel/binfmt_elfn32.o
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c: In function ‘fill_prstatus’:
arch/mips/kernel/../../../fs/binfmt_elf.c:1330:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1331:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1336:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1337:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1339:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1340:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
  AS      arch/mips/kernel/scall64-n32.o
  CC      arch/mips/kernel/signal_n32.o
  CC      arch/mips/kernel/binfmt_elfo32.o
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c: In function ‘fill_prstatus’:
arch/mips/kernel/../../../fs/binfmt_elf.c:1330:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1331:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1336:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1337:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1339:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1340:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: OCTEON: Improve _machine_halt implementation.
David Daney [Fri, 24 May 2013 16:23:02 +0000 (16:23 +0000)]
MIPS: OCTEON: Improve _machine_halt implementation.

As noted by Wladislav Wiebe:
   $ halt
   ..
   Sent SIGKILL to all processes
   Requesting system halt
   [66.729373] System halted.
   [66.733244]
   [66.734761] =====================================
   [66.739473] [ BUG: lock held at task exit time! ]
   [66.744188] 3.8.7-0-sampleversion-fct #49 Tainted: G           O
   [66.750202] -------------------------------------
   [66.754913] init/21479 is exiting with locks still held!
   [66.760234] 1 lock held by init/21479:
   [66.763990]  #0:  (reboot_mutex){+.+...}, at: [<ffffffff801776c8>] SyS_reboot+0xe0/0x218
   [66.772165]
   [66.772165] stack backtrace:
   [66.776532] Call Trace:
   [66.778992] [<ffffffff805780a8>] dump_stack+0x8/0x34
   [66.783972] [<ffffffff801618b0>] do_exit+0x610/0xa70
   [66.788948] [<ffffffff801777a8>] SyS_reboot+0x1c0/0x218
   [66.794186] [<ffffffff8013d6a4>] handle_sys64+0x44/0x64

This is an alternative fix to the one sent by Wladislav.  We kill the
watchdog for each CPU and then spin in WAIT with interrupts disabled.
This is the lowest power mode for the OCTEON.  If we were to spin with
interrupts enabled, we would get a continual stream of warning messages
and backtraces from the lockup detector, so I chose to disable
interrupts.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: Maxim Uvarov <muvarov@gmail.com>
Cc: Wladislav Wiebe <wladislav.kw@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Patchwork: https://patchwork.linux-mips.org/patch/5324/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: rtlx: Fix implicit declaration of function set_vi_handler()
Yoichi Yuasa [Tue, 28 May 2013 01:23:22 +0000 (01:23 +0000)]
MIPS: rtlx: Fix implicit declaration of function set_vi_handler()

arch/mips/kernel/rtlx.c: In function 'rtlx_module_init':
arch/mips/kernel/rtlx.c:523:3: error: implicit declaration of function 'set_vi_handler' [-Werror=implicit-function-declaration]

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5340/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agob43: stop format string leaking into error msgs
Kees Cook [Fri, 10 May 2013 21:48:21 +0000 (14:48 -0700)]
b43: stop format string leaking into error msgs

The module parameter "fwpostfix" is userspace controllable, unfiltered,
and is used to define the firmware filename. b43_do_request_fw() populates
ctx->errors[] on error, containing the firmware filename. b43err()
parses its arguments as a format string. For systems with b43 hardware,
this could lead to a uid-0 to ring-0 escalation.

CVE-2013-2852

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Use minstrel rate control by default
Sujith Manoharan [Thu, 6 Jun 2013 04:36:29 +0000 (10:06 +0530)]
ath9k: Use minstrel rate control by default

The ath9k rate control algorithm has various architectural
issues that make it a poor fit in scenarios like congested
environments etc.

An example: https://bugzilla.redhat.com/show_bug.cgi?id=927191

Change the default to minstrel which is more robust in such cases.
The ath9k RC code is left in the driver for now, maybe it can
be removed altogether later on.

Cc: stable@vger.kernel.org
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMIPS: Implement HAVE_CONTEXT_TRACKING.
Ralf Baechle [Tue, 28 May 2013 23:07:19 +0000 (01:07 +0200)]
MIPS: Implement HAVE_CONTEXT_TRACKING.

This enables support for CONFIG_NO_HZ_FULL.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Cleanup flags in syscall flags handlers.
Ralf Baechle [Tue, 28 May 2013 23:02:18 +0000 (01:02 +0200)]
MIPS: Cleanup flags in syscall flags handlers.

This will simplify further modifications.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoGFS2: fix error propagation in init_threads()
Alexey Khoroshilov [Wed, 5 Jun 2013 21:29:04 +0000 (01:29 +0400)]
GFS2: fix error propagation in init_threads()

If kthread_run() fails, init_threads() returns
IS_ERR(p) instead of PTR_ERR(p).

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
11 years agopowerpc/hw_breakpoints: Add DABRX cpu feature to fix 32-bit regression
Michael Neuling [Thu, 16 May 2013 20:27:31 +0000 (20:27 +0000)]
powerpc/hw_breakpoints: Add DABRX cpu feature to fix 32-bit regression

When introducing support for DABRX in 4474ef0, we broke older 32-bit CPUs
that don't have that register.

Some CPUs have a DABR but not DABRX.  Configuration are:
- No 32bit CPUs have DABRX but some have DABR.
- POWER4+ and below have the DABR but no DABRX.
- 970 and POWER5 and above have DABR and DABRX.
- POWER8 has DAWR, hence no DABRX.

This introduces CPU_FTR_DABRX and sets it on appropriate CPUs.  We use
the top 64 bits for CPU FTR bits since only 64 bit CPUs have this.

Processors that don't have the DABRX will still work as they will fall
back to software filtering these breakpoints via perf_exclude_event().

Signed-off-by: Michael Neuling <mikey@neuling.org>
Reported-by: "Gorelik, Jacob (335F)" <jacob.gorelik@jpl.nasa.gov>
cc: stable@vger.kernel.org (v3.9 only)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/power8: Update denormalization handler
Michael Neuling [Wed, 29 May 2013 21:33:19 +0000 (21:33 +0000)]
powerpc/power8: Update denormalization handler

POWER8 can take a denormalisation exception on any VSX registers.

This does the extra 32 VSX registers we don't currently handle.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/pseries: Simplify denormalization handler
Michael Neuling [Wed, 29 May 2013 21:33:18 +0000 (21:33 +0000)]
powerpc/pseries: Simplify denormalization handler

The following simplifies the denorm code by using macros to generate the long
stream of almost identical instructions.

This patch results in no changes to the output binary, but removes a lot of
lines of code.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/power8: Fix oprofile and perf
Michael Neuling [Tue, 4 Jun 2013 19:38:54 +0000 (19:38 +0000)]
powerpc/power8: Fix oprofile and perf

In 2ac6f42 powerpc/cputable: Fix oprofile_cpu_type on power8
we broke all power8 hw events.

This reverts this change and uses oprofile_type instead. Perf now works
on POWER8 again and oprofile will revert to using timers on POWER8.

Kudos to mpe this fix.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Rename PMU interrupts from CNT to PMI
Michael Ellerman [Mon, 3 Jun 2013 18:21:17 +0000 (18:21 +0000)]
powerpc: Rename PMU interrupts from CNT to PMI

Back in commit 89713ed "Add timer, performance monitor and machine check
counts to /proc/interrupts" we added a count of PMU interrupts to the
output of /proc/interrupts.

At the time we named them "CNT" to match x86.

However in commit 89ccf46 "Rename 'performance counter interrupt'", the
x86 guys renamed theirs from "CNT" to "PMI".

Arguably changing the name could break someone's script, but I think the
chance of that is minimal, and it's preferable to have a name that 1) is
somewhat meaningful, and 2) matches x86.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/eeh: Don't check RTAS token to get PE addr
Gavin Shan [Wed, 5 Jun 2013 14:25:50 +0000 (14:25 +0000)]
powerpc/eeh: Don't check RTAS token to get PE addr

RTAS token "ibm,get-config-addr-info" or ibm,get-config-addr-info2"
are used to retrieve the PE address according to PCI address, which
made up of domain/bus/slot/function. If we don't have those 2 tokens,
the domain/bus/slot/function would be used as the address for EEH
RTAS operations. Some older f/w might not have those 2 tokens and
that blocks the EEH functionality to be initialized. It was introduced
by commit e2af155c ("powerpc/eeh: pseries platform EEH initialization").

The patch skips the check on those 2 tokens so we can bring up EEH
functionality successfully. And domain/bus/slot/function will be
used as address for EEH RTAS operations.

Cc: <stable@vger.kernel.org> # v3.4+
Reported-by: Robert Knight <knight@princeton.edu>
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Tested-by: Robert Knight <knight@princeton.edu>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/pci: Check the bus address instead of resource address in pcibios_fixup_resources
Kevin Hao [Wed, 5 Jun 2013 02:26:51 +0000 (02:26 +0000)]
powerpc/pci: Check the bus address instead of resource address in pcibios_fixup_resources

If a BAR has the value of 0, we would assume that it is unset yet and
then mark the resource as unset and would reassign it later. But after
commit 6c5705fe (powerpc/PCI: get rid of device resource fixups)
the pcibios_fixup_resources is invoked after the bus address was
translated to linux resource. So the value of res->start is resource
address. And since the resource and bus address may be different, we
should translate it to the bus address before doing the check.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoarch, mm: Remove tlb_fast_mode()
Peter Zijlstra [Wed, 5 Jun 2013 10:26:50 +0000 (12:26 +0200)]
arch, mm: Remove tlb_fast_mode()

Since the introduction of preemptible mmu_gather TLB fast mode has been
broken. TLB fast mode relies on there being absolutely no concurrency;
it frees pages first and invalidates TLBs later.

However now we can get concurrency and stuff goes *bang*.

This patch removes all tlb_fast_mode() code; it was found the better
option vs trying to patch the hole by entangling tlb invalidation with
the scheduler.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Tony Luck <tony.luck@intel.com>
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Thu, 6 Jun 2013 01:05:45 +0000 (10:05 +0900)]
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kbuild fixes from Michal Marek:
 "There is one fix for a kbuild regression, plus three kconfig fixes for
  bugs that have alway been there, but are simple enough to be fixed in
  an -rc"

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig/menu.c: fix multiple references to expressions in menu_add_prop()
  mconf: handle keys in empty dialogs
  kbuild: Don't assume dts files live in arch/*/boot/dts
  scripts/config: fix assignment of parameters for short version of --*-after options

11 years agoMerge branches 'devel-stable', 'fixes', 'mcpm', 'misc' and 'mmci' into for-next
Russell King [Wed, 5 Jun 2013 22:58:46 +0000 (23:58 +0100)]
Merge branches 'devel-stable', 'fixes', 'mcpm', 'misc' and 'mmci' into for-next

11 years agoARM: 7741/1: mcpm_platsmp.c: remove empty smp_init_cpus method
Nicolas Pitre [Fri, 31 May 2013 04:24:03 +0000 (05:24 +0100)]
ARM: 7741/1: mcpm_platsmp.c: remove empty smp_init_cpus method

The smp_init_cpus method in the smp_operations structure is optional
and can be omitted entirely.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7740/1: MCPM: prettify debug output
Nicolas Pitre [Fri, 31 May 2013 04:17:29 +0000 (05:17 +0100)]
ARM: 7740/1: MCPM: prettify debug output

The CPU and cluster numbers (MPIDR affinity levels 0 and 1) may have
at most 8 bits each.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7746/1: mm: lazy cache flushing on non-mapped pages
Ming Lei [Wed, 5 Jun 2013 01:44:00 +0000 (02:44 +0100)]
ARM: 7746/1: mm: lazy cache flushing on non-mapped pages

Currently flush_dcache_page() thinks pages as non-mapped if
mapping_mapped(mapping) return false. This approach is very
coase:
- mmap on part of file may cause all pages backed on
the file being thought as mmaped

- file-backed pages aren't mapped into user space actually
if the memory mmaped on the file isn't accessed

This patch uses page_mapped() to decide if the page has been
mapped.

From the attached test code, I find there is much performance
improvement(>25%) when accessing page caches via read under this
situations, so memcpy benefits a lot from not flushing cache
under this situation.

No.   read time without the patch No. read time with the patch
================================================================
No. 0, time  22615636 us No. 0, time  22014717 us
No. 1, time  4387851 us  No. 1, time  3113184 us
No. 2, time  4276535 us  No. 2, time  3005244 us
No. 3, time  4259821 us  No. 3, time  3001565 us
No. 4, time  4263811 us  No. 4, time  3002748 us
No. 5, time  4258486 us  No. 5, time  3004104 us
No. 6, time  4253009 us  No. 6, time  3002188 us
No. 7, time  4262809 us  No. 7, time  2998196 us
No. 8, time  4264525 us  No. 8, time  3007255 us
No. 9, time  4267795 us  No. 9, time  3005094 us

1), No.0. is to read the file from storage device, and others are
to read the file from page caches basically.
2), file size is 512M, and is on ext4 over usb mass storage.
3), the test is done on Pandaboard.

unsigned int  sum = 0;
unsigned long sum_val = 0;

static unsigned long tv_diff(struct timeval *tv1, struct timeval *tv2)
{
return (tv2->tv_sec - tv1->tv_sec) * 1000000 +
(tv2->tv_usec - tv1->tv_usec);
}

int main(int argc, char *argv[])
{
char *mbuf, fbuf;
int fd;
int i;
unsigned long page_size, size;
struct stat stat;
struct timeval t1, t2;
unsigned char *rbuf = malloc(32 * page_size);

if (!rbuf) {
printf(" %sn", "malloc failed");
exit(-1);
}

page_size = getpagesize();
fd = open(argv[1], O_RDWR);
assert(fd >= 0);

fstat(fd, &stat);
size = stat.st_size;
printf("%s: file %s, size %lu, page size %lun",
argv[0],
argv[1], size, page_size);

gettimeofday(&t1, NULL);
mbuf = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (!mbuf) {
printf(" %sn", "mmap failed");
exit(-1);
}

for (i = 0 ; i < size ; i += (page_size * 32)) {
int rcnt;
lseek(fd, i, SEEK_SET);
rcnt = read(fd, rbuf, page_size * 32);
if (rcnt != page_size * 32) {
printf("%s: read faildn", __func__);
exit(-1);
}
}
free(rbuf);
munmap(mbuf, size);
gettimeofday(&t2, NULL);
printf("tread mmaped time: %luusn", tv_diff(&t1, &t2));

close(fd);
}

Cc: Michel Lespinasse <walken@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7745/1: psci: fix building without HOTPLUG_CPU
Arnd Bergmann [Mon, 3 Jun 2013 22:09:14 +0000 (23:09 +0100)]
ARM: 7745/1: psci: fix building without HOTPLUG_CPU

The cpu_die field in smp_operations is not valid with CONFIG_HOTPLUG_CPU,
so we must enclose it in #ifdef, but at least that lets us remove
two other lines.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7747/1: pcpu: ensure __my_cpu_offset cannot be re-ordered across barrier()
Will Deacon [Wed, 5 Jun 2013 10:20:33 +0000 (11:20 +0100)]
ARM: 7747/1: pcpu: ensure __my_cpu_offset cannot be re-ordered across barrier()

__my_cpu_offset is non-volatile, since we want its value to be cached
when we access several per-cpu variables in a row with preemption
disabled. This means that we rely on preempt_{en,dis}able to hazard
with the operation via the barrier() macro, so that we can't end up
migrating CPUs without reloading the per-cpu offset.

Unfortunately, GCC doesn't treat a "memory" clobber on a non-volatile
asm block as a side-effect, and will happily re-order it before other
memory clobbers (including those in prempt_disable()) and cache the
value. This has been observed to break the cmpxchg logic in the slub
allocator, leading to livelock in kmem_cache_alloc in mainline kernels.

This patch adds a dummy memory input operand to __my_cpu_offset,
forcing it to be ordered with respect to the barrier() macro.

Cc: <stable@vger.kernel.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7750/1: update legacy CPU ID in decompressor cache support jump table
Marc C [Wed, 5 Jun 2013 21:02:23 +0000 (22:02 +0100)]
ARM: 7750/1: update legacy CPU ID in decompressor cache support jump table

The previous mask values for the legacy ARM CPU IDs were conflicting
with the CPU ID assignments for late-generation CPUs (like the
Qualcomm MSM/QSD or Broadcom Brahma-15 processors). This change
corrects the legacy ARM CPU ID value so that the jump table can
fall-through to the appropriate cache maintenance / MMU functions.

Signed-off-by: Marc C <marc.ceeeee@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7743/1: compressed/head.S: work around new binutils warning
Arnd Bergmann [Fri, 31 May 2013 21:50:47 +0000 (22:50 +0100)]
ARM: 7743/1: compressed/head.S: work around new binutils warning

In August 2012, Matthew Gretton-Dann checked a change into binutils
labelled "Error on obsolete & warn on deprecated registers", apparently as
part of ARMv8 support. Apparently, this was supposed to emit the message
"Warning: This coprocessor register access is deprecated in ARMv8" when
using certain mcr/mrc instructions and building for ARMv8. Unfortunately,
the message that is actually emitted appears to be '(null)', which is
less helpful in comparison.

Even more unfortunately, this is biting us on every single kernel
build with a new gas, because arch/arm/boot/compressed/head.S and some
other files in that directory are built with -march=all since kernel
commit 80cec14a8 "[ARM] Add -march=all to assembly file build in
arch/arm/boot/compressed" back in v2.6.28.

This patch reverts Russell's nice solution and instead marks the head.S
file to be built for armv7-a, which fortunately lets us build all
instructions in that file without warnings even on the broken binutils.

Without this patch, building anything results in:

arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:565: Warning: (null)
arch/arm/boot/compressed/head.S:676: Warning: (null)
arch/arm/boot/compressed/head.S:698: Warning: (null)
arch/arm/boot/compressed/head.S:722: Warning: (null)
arch/arm/boot/compressed/head.S:726: Warning: (null)
arch/arm/boot/compressed/head.S:957: Warning: (null)
arch/arm/boot/compressed/head.S:996: Warning: (null)
arch/arm/boot/compressed/head.S:997: Warning: (null)
arch/arm/boot/compressed/head.S:1027: Warning: (null)
arch/arm/boot/compressed/head.S:1035: Warning: (null)
arch/arm/boot/compressed/head.S:1046: Warning: (null)
arch/arm/boot/compressed/head.S:1060: Warning: (null)
arch/arm/boot/compressed/head.S:1092: Warning: (null)
arch/arm/boot/compressed/head.S:1094: Warning: (null)
arch/arm/boot/compressed/head.S:1095: Warning: (null)
arch/arm/boot/compressed/head.S:1102: Warning: (null)
arch/arm/boot/compressed/head.S:1134: Warning: (null)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org
Cc: Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7742/1: topology: export cpu_topology
Arnd Bergmann [Fri, 31 May 2013 21:49:22 +0000 (22:49 +0100)]
ARM: 7742/1: topology: export cpu_topology

The cpu_topology symbol is required by any driver using the topology
interfaces, which leads to a couple of build errors:

ERROR: "cpu_topology" [drivers/net/ethernet/sfc/sfc.ko] undefined!
ERROR: "cpu_topology" [drivers/cpufreq/arm_big_little.ko] undefined!
ERROR: "cpu_topology" [drivers/block/mtip32xx/mtip32xx.ko] undefined!

The obvious solution is to export this symbol.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>