]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge remote-tracking branch 'nfs/linux-next'
Thierry Reding [Fri, 25 Oct 2013 09:29:47 +0000 (11:29 +0200)]
Merge remote-tracking branch 'nfs/linux-next'

11 years agoMerge remote-tracking branch 'logfs/master'
Thierry Reding [Fri, 25 Oct 2013 09:29:40 +0000 (11:29 +0200)]
Merge remote-tracking branch 'logfs/master'

11 years agoMerge remote-tracking branch 'gfs2/master'
Thierry Reding [Fri, 25 Oct 2013 09:29:38 +0000 (11:29 +0200)]
Merge remote-tracking branch 'gfs2/master'

11 years agoMerge remote-tracking branch 'fuse/for-next'
Thierry Reding [Fri, 25 Oct 2013 09:29:37 +0000 (11:29 +0200)]
Merge remote-tracking branch 'fuse/for-next'

11 years agoMerge remote-tracking branch 'fscache/fscache'
Thierry Reding [Fri, 25 Oct 2013 09:29:36 +0000 (11:29 +0200)]
Merge remote-tracking branch 'fscache/fscache'

11 years agoMerge remote-tracking branch 'f2fs/dev'
Thierry Reding [Fri, 25 Oct 2013 09:29:35 +0000 (11:29 +0200)]
Merge remote-tracking branch 'f2fs/dev'

11 years agoMerge remote-tracking branch 'ext4/dev'
Thierry Reding [Fri, 25 Oct 2013 09:29:34 +0000 (11:29 +0200)]
Merge remote-tracking branch 'ext4/dev'

11 years agoMerge remote-tracking branch 'cifs/for-next'
Thierry Reding [Fri, 25 Oct 2013 09:29:30 +0000 (11:29 +0200)]
Merge remote-tracking branch 'cifs/for-next'

11 years agoMerge remote-tracking branch 'ceph/master'
Thierry Reding [Fri, 25 Oct 2013 09:29:29 +0000 (11:29 +0200)]
Merge remote-tracking branch 'ceph/master'

11 years agoMerge remote-tracking branch 'aio-direct/for-next'
Thierry Reding [Fri, 25 Oct 2013 09:29:27 +0000 (11:29 +0200)]
Merge remote-tracking branch 'aio-direct/for-next'

11 years agoMerge remote-tracking branch 'sh/sh-latest'
Thierry Reding [Fri, 25 Oct 2013 09:29:21 +0000 (11:29 +0200)]
Merge remote-tracking branch 'sh/sh-latest'

Conflicts:
arch/sh/kernel/cpu/sh2a/Makefile
drivers/tty/serial/sh-sci.c
include/linux/serial_sci.h

11 years agoMerge remote-tracking branch 's390/features'
Thierry Reding [Fri, 25 Oct 2013 09:20:17 +0000 (11:20 +0200)]
Merge remote-tracking branch 's390/features'

11 years agoMerge remote-tracking branch 'mpc5xxx/next'
Thierry Reding [Fri, 25 Oct 2013 09:20:16 +0000 (11:20 +0200)]
Merge remote-tracking branch 'mpc5xxx/next'

11 years agoMerge remote-tracking branch 'powerpc/next'
Thierry Reding [Fri, 25 Oct 2013 09:20:15 +0000 (11:20 +0200)]
Merge remote-tracking branch 'powerpc/next'

11 years agoMerge remote-tracking branch 'parisc-hd/for-next'
Thierry Reding [Fri, 25 Oct 2013 09:20:14 +0000 (11:20 +0200)]
Merge remote-tracking branch 'parisc-hd/for-next'

11 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Thierry Reding [Fri, 25 Oct 2013 09:20:12 +0000 (11:20 +0200)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

11 years agoMerge remote-tracking branch 'm68k/for-next'
Thierry Reding [Fri, 25 Oct 2013 09:20:09 +0000 (11:20 +0200)]
Merge remote-tracking branch 'm68k/for-next'

11 years agoMerge remote-tracking branch 'ia64/next'
Thierry Reding [Fri, 25 Oct 2013 09:20:08 +0000 (11:20 +0200)]
Merge remote-tracking branch 'ia64/next'

11 years agoMerge remote-tracking branch 'h8300-remove/h8300-remove'
Thierry Reding [Fri, 25 Oct 2013 09:20:05 +0000 (11:20 +0200)]
Merge remote-tracking branch 'h8300-remove/h8300-remove'

Conflicts:
drivers/parport/Kconfig

11 years agoMerge remote-tracking branch 'c6x/for-linux-next'
Thierry Reding [Fri, 25 Oct 2013 09:19:46 +0000 (11:19 +0200)]
Merge remote-tracking branch 'c6x/for-linux-next'

Conflicts:
arch/arm/Kconfig

11 years agoMerge remote-tracking branch 'arm64/upstream'
Thierry Reding [Fri, 25 Oct 2013 09:19:41 +0000 (11:19 +0200)]
Merge remote-tracking branch 'arm64/upstream'

11 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Thierry Reding [Fri, 25 Oct 2013 09:19:41 +0000 (11:19 +0200)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

11 years agoMerge remote-tracking branch 'arm/for-next'
Thierry Reding [Fri, 25 Oct 2013 09:19:39 +0000 (11:19 +0200)]
Merge remote-tracking branch 'arm/for-next'

Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

11 years agoMerge remote-tracking branch 'arc/for-next'
Thierry Reding [Fri, 25 Oct 2013 09:19:28 +0000 (11:19 +0200)]
Merge remote-tracking branch 'arc/for-next'

11 years agoMerge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'
Thierry Reding [Fri, 25 Oct 2013 09:19:26 +0000 (11:19 +0200)]
Merge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'

11 years agoMerge remote-tracking branch 'input-current/for-linus'
Thierry Reding [Fri, 25 Oct 2013 09:19:20 +0000 (11:19 +0200)]
Merge remote-tracking branch 'input-current/for-linus'

11 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Thierry Reding [Fri, 25 Oct 2013 09:19:19 +0000 (11:19 +0200)]
Merge remote-tracking branch 'tty.current/tty-linus'

11 years agoMerge remote-tracking branch 'wireless/master'
Thierry Reding [Fri, 25 Oct 2013 09:19:18 +0000 (11:19 +0200)]
Merge remote-tracking branch 'wireless/master'

11 years agoMerge remote-tracking branch 'sound-current/for-linus'
Thierry Reding [Fri, 25 Oct 2013 09:19:18 +0000 (11:19 +0200)]
Merge remote-tracking branch 'sound-current/for-linus'

11 years agoMerge remote-tracking branch 'ipsec/master'
Thierry Reding [Fri, 25 Oct 2013 09:19:17 +0000 (11:19 +0200)]
Merge remote-tracking branch 'ipsec/master'

11 years agoMerge remote-tracking branch 'net/master'
Thierry Reding [Fri, 25 Oct 2013 09:19:17 +0000 (11:19 +0200)]
Merge remote-tracking branch 'net/master'

11 years agoMerge remote-tracking branch 'arm-current/fixes'
Thierry Reding [Fri, 25 Oct 2013 09:19:16 +0000 (11:19 +0200)]
Merge remote-tracking branch 'arm-current/fixes'

11 years agof2fs: add tracepoint for vm_page_mkwrite
Jaegeuk Kim [Fri, 25 Oct 2013 05:26:31 +0000 (14:26 +0900)]
f2fs: add tracepoint for vm_page_mkwrite

This patch adds a tracepoint for f2fs_vm_page_mkwrite.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: add tracepoint for set_page_dirty
Jaegeuk Kim [Thu, 24 Oct 2013 08:53:29 +0000 (17:53 +0900)]
f2fs: add tracepoint for set_page_dirty

This patch adds a tracepoint for set_page_dirty.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: remove redundant set_page_dirty from write_compacted_summaries
Chao Yu [Thu, 24 Oct 2013 07:08:28 +0000 (15:08 +0800)]
f2fs: remove redundant set_page_dirty from write_compacted_summaries

Previously, set_page_dirty is called every time after writting one summary info
into compacted summary page,
To avoid redundant set_page_dirty, we only call set_page_dirty before release
page.

Signed-off-by: Yu Chao <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: add reclaiming control by sysfs
Jaegeuk Kim [Thu, 24 Oct 2013 06:49:07 +0000 (15:49 +0900)]
f2fs: add reclaiming control by sysfs

This patch adds a control method in sysfs to reclaim prefree segments.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: introduce f2fs_balance_fs_bg for some background jobs
Jaegeuk Kim [Thu, 24 Oct 2013 05:19:18 +0000 (14:19 +0900)]
f2fs: introduce f2fs_balance_fs_bg for some background jobs

This patch merges some background jobs into this new function.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: reclaim prefree segments periodically
Jaegeuk Kim [Thu, 24 Oct 2013 04:31:34 +0000 (13:31 +0900)]
f2fs: reclaim prefree segments periodically

Previously, f2fs postpones reclaiming prefree segments into free segments
as much as possible.
However, if user writes and deletes a bunch of data without any sync or fsync
calls, some flash storages can suffer from garbage collections.

So, this patch adds the reclaiming codes to f2fs_write_node_pages and background
GC thread.

If there are a lot of prefree segments, let's do checkpoint so that f2fs
submits discard commands for the prefree regions to the flash storage.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: use bool for booleans
Haicheng Li [Wed, 23 Oct 2013 04:39:32 +0000 (12:39 +0800)]
f2fs: use bool for booleans

Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agof2fs: clean up several status-related operations
Jaegeuk Kim [Tue, 22 Oct 2013 11:56:10 +0000 (20:56 +0900)]
f2fs: clean up several status-related operations

This patch cleans up improper definitions that update some status information.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
11 years agoMerge tag 'ecryptfs-3.12-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 25 Oct 2013 06:32:01 +0000 (07:32 +0100)]
Merge tag 'ecryptfs-3.12-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs

Pull ecryptfs fixes from Tyler Hicks:
 "Two important fixes
   - Fix long standing memory leak in the (rarely used) public key
     support
   - Fix large file corruption on 32 bit architectures"

* tag 'ecryptfs-3.12-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  eCryptfs: fix 32 bit corruption issue
  ecryptfs: Fix memory leakage in keystore.c

11 years agoeCryptfs: fix 32 bit corruption issue
Colin Ian King [Thu, 24 Oct 2013 14:08:07 +0000 (14:08 +0000)]
eCryptfs: fix 32 bit corruption issue

Shifting page->index on 32 bit systems was overflowing, causing
data corruption of > 4GB files. Fix this by casting it first.

https://launchpad.net/bugs/1243636

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reported-by: Lars Duesing <lars.duesing@camelotsweb.de>
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
11 years agos390/pci: cleanup function information block
Sebastian Ott [Tue, 22 Oct 2013 13:19:24 +0000 (15:19 +0200)]
s390/pci: cleanup function information block

Cleanup function information block used as a modify pci function
parameter. Change reserved members to be anonymous. Fix the size
of the struct and add proper alignment information. Also put the
FIB on the stack.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/pci: remove CONFIG_PCI_DEBUG dependancy
Sebastian Ott [Tue, 22 Oct 2013 13:18:14 +0000 (15:18 +0200)]
s390/pci: remove CONFIG_PCI_DEBUG dependancy

Add debugfs entries regardless of CONFIG_PCI_DEBUG.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/pci: message cleanup
Sebastian Ott [Tue, 22 Oct 2013 13:17:19 +0000 (15:17 +0200)]
s390/pci: message cleanup

Cleanup arch specific pci messages. Remove unhelpful messages and
replace others with entries in the debugfs.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agoUpdate default configuration
Martin Schwidefsky [Thu, 5 Sep 2013 06:58:19 +0000 (08:58 +0200)]
Update default configuration

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390: add a couple of useful defconfigs
Heiko Carstens [Mon, 21 Oct 2013 11:43:08 +0000 (13:43 +0200)]
s390: add a couple of useful defconfigs

Add four more defconfigs which we maintained outside of
the kernel tree for no good reason.
Inside of the kernel tree they can be easily used:

make whatever_defconfig

"make help" shows the available defconfigs.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/percpu: make use of interlocked-access facility 1 instructions
Heiko Carstens [Mon, 21 Oct 2013 05:57:41 +0000 (07:57 +0200)]
s390/percpu: make use of interlocked-access facility 1 instructions

Optimize this_cpu_* functions for 64 bit by making use of new instructions
that came with the interlocked-access facility 1 (load-and-*) and the
general-instructions-extension facility (asi, agsi).
That way we get rid of the compare-and-swap loop in most cases.
Code size reduction (defconfig, -march=z196): 11,555 bytes.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/percpu: use generic percpu ops for CONFIG_32BIT
Heiko Carstens [Mon, 21 Oct 2013 05:44:08 +0000 (07:44 +0200)]
s390/percpu: use generic percpu ops for CONFIG_32BIT

Remove the special cases for the this_cpu_* functions for 32 bit
in order to make it easier to add additional code for 64 bit.
32 bit will use the generic implementation.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/compat: make psw32_user_bits a constant value again
Heiko Carstens [Wed, 16 Oct 2013 12:17:29 +0000 (14:17 +0200)]
s390/compat: make psw32_user_bits a constant value again

Make psw32_user_bits a constant value again.
This is a leftover of the code which allowed to run the kernel either
in primary or home space which got removed with 9a905662 "s390/uaccess:
always run the kernel in home space".

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390: fix handling of runtime instrumentation psw bit
Heiko Carstens [Wed, 16 Oct 2013 07:58:01 +0000 (09:58 +0200)]
s390: fix handling of runtime instrumentation psw bit

Fix the following bugs:
- When returning from a signal the signal handler copies the saved psw mask
  from user space and uses parts of it. Especially it restores the RI bit
  unconditionally. If however the machine doesn't support RI, or RI is
  disabled for the task, the last lpswe instruction which returns to user
  space will generate a specification exception.
  To fix this check if the RI bit is allowed to be set and kill the task
  if not.
- In the compat mode signal handler code the RI bit of the psw mask gets
  propagated to the mask of the return psw: if user space enables RI in the
  signal handler, RI will also be enabled after the signal handler is
  finished.
  This is a different behaviour than with 64 bit tasks. So change this to
  match the 64 bit semantics, which restores the original RI bit value.
- Fix similar oddities within the ptrace code as well.

Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390: fix save and restore of the floating-point-control register
Martin Schwidefsky [Tue, 15 Oct 2013 14:08:34 +0000 (16:08 +0200)]
s390: fix save and restore of the floating-point-control register

The FPC_VALID_MASK has been used to check the validity of the value
to be loaded into the floating-point-control register. With the
introduction of the floating-point extension facility and the
decimal-floating-point additional bits have been defined which need
to be checked in a non straight forward way. So far these bits have
been ignored which can cause an incorrect results for decimal-
floating-point operations, e.g. an incorrect rounding mode to be
set after signal return.

The static check with the FPC_VALID_MASK is replaced with a trial
load of the floating-point-control value, see test_fp_ctl.

In addition an information leak with the padding word between the
floating-point-control word and the floating-point registers in
the s390_fp_regs is fixed.

Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/3270: use diagnose 0x210 for device sensing under z/VM
Martin Schwidefsky [Tue, 15 Oct 2013 11:41:05 +0000 (13:41 +0200)]
s390/3270: use diagnose 0x210 for device sensing under z/VM

There is a debugging leftover from git commit 4d334fd155b53adf
"s390/3270: asynchronous size sensing" in raw3270_reset_device_cb.
Under z/VM the diagnose 0x210 can be used to find the correct
size of the 3270 terminal.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/crypto: fix aes_s390 crypto module unload problem
Ingo Tuchscherer [Tue, 15 Oct 2013 09:24:07 +0000 (11:24 +0200)]
s390/crypto: fix aes_s390 crypto module unload problem

If a machine has no hardware support for the xts-aes or ctr-aes algorithms
they are not registered in aes_s390_init. But aes_s390_fini unconditionally
unregisters the algorithms which causes crypto_remove_alg to crash.
Add two flag variables to remember if xts-aes and ctr-aes have been added.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/3270: remove unnecessary pointer check
Martin Schwidefsky [Mon, 14 Oct 2013 14:48:29 +0000 (16:48 +0200)]
s390/3270: remove unnecessary pointer check

Make smatch happy and remove this warning:

drivers/s390/char/raw3270.c:347 raw3270_irq() error: we previously
 assumed 'rq' could be null (see line 342)

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/monwriter: fix smatch warning for strcpy()
Gerald Schaefer [Mon, 14 Oct 2013 13:51:31 +0000 (15:51 +0200)]
s390/monwriter: fix smatch warning for strcpy()

This patch fixes the following smatch warning:
monwrite_diag() error: strcpy() '"LNXAPPL"' too large for 'id.prod_nr'
(8 vs 7)
Using strcpy() is wrong, because it also copies the terminating null
byte, but in this case the extra copied null byte will be overwritten
right after the strcpy(), so there is no real problem here.
Use strncpy() to fix the warning.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/appldata: make copy_from_user() invocations provably correct
Heiko Carstens [Mon, 14 Oct 2013 12:08:35 +0000 (14:08 +0200)]
s390/appldata: make copy_from_user() invocations provably correct

Just change the type of "len" to unsigned int so the compiler can prove
that we don't have a buffer overflow (and generates less code).
We get rid of these:

In function 'copy_from_user',
    inlined from 'appldata_interval_handler' at
    arch/s390/appldata/appldata_base.c:265:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct
In function 'copy_from_user',
    inlined from 'appldata_timer_handler' at
    arch/s390/appldata/appldata_base.c:225:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct
In function 'copy_from_user',
    inlined from 'appldata_generic_handler' at
    arch/s390/appldata/appldata_base.c:333:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/cmm: make copy_from_user() invocation provably correct
Heiko Carstens [Mon, 14 Oct 2013 11:58:10 +0000 (13:58 +0200)]
s390/cmm: make copy_from_user() invocation provably correct

Get rid of these two warnings:

In function 'copy_from_user',
    inlined from 'cmm_timeout_handler' at arch/s390/mm/cmm.c:310:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct
In function 'copy_from_user',
    inlined from 'cmm_pages_handler' at arch/s390/mm/cmm.c:270:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct

Change the "len" type to unsigned int, so we can make sure that there is no
buffer overflow. This also generates less code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/cache: get rid of compile warning
Heiko Carstens [Mon, 14 Oct 2013 11:48:41 +0000 (13:48 +0200)]
s390/cache: get rid of compile warning

Get rid of this one:

arch/s390/kernel/cache.c: In function 'cache_build_info':
arch/s390/kernel/cache.c:144: warning: 'private' may be used uninitialized
in this function

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/compat,signal: change return values to -EFAULT
Heiko Carstens [Mon, 14 Oct 2013 11:34:28 +0000 (13:34 +0200)]
s390/compat,signal: change return values to -EFAULT

Instead of returnin the number of bytes not copied and/or -EFAULT let the
signal handler helper functions always return -EFAULT if a user space
access failed.
This doesn't fix a bug in the current code, but makes is harder to get it
wrong in the future.
Also "smatch" won't complain anymore about the fact that the number of
remaining bytes gets returned instead of -EFAULT.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390: Remove unused declaration of zfcpdump_prefix_array[]
Michael Holzheu [Mon, 14 Oct 2013 08:35:48 +0000 (10:35 +0200)]
s390: Remove unused declaration of zfcpdump_prefix_array[]

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/cio: fix error-prone defines
Peter Oberparleiter [Fri, 11 Oct 2013 09:01:17 +0000 (11:01 +0200)]
s390/cio: fix error-prone defines

Missing parenthesis may cause problems when using the defines
together with operations of higher precedence.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390: Remove zfcpdump NR_CPUS dependency
Michael Holzheu [Fri, 11 Oct 2013 08:29:23 +0000 (10:29 +0200)]
s390: Remove zfcpdump NR_CPUS dependency

Currently zfpcdump can only collect registers for up to CONFIG_NR_CPUS
CPUss. This dependency is not necessary. So remove it by dynamically
allocating the save area array.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/ftrace: prepare_ftrace_return() function call order
Heiko Carstens [Fri, 11 Oct 2013 06:55:57 +0000 (08:55 +0200)]
s390/ftrace: prepare_ftrace_return() function call order

Steven Rostedt noted that s390 is the only architecture which calls
ftrace_push_return_trace() before ftrace_graph_entry() and therefore has
the small advantage that trace.depth gets initialized automatically.

However this small advantage isn't worth the difference and possible subtle
breakage that may result from this.
So change s390 to have the same function call order like all other
architectures: first ftrace_graph_entry(), then ftrace_push_return_trace()

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/crashdump: remove unused variable
Heiko Carstens [Thu, 10 Oct 2013 14:50:55 +0000 (16:50 +0200)]
s390/crashdump: remove unused variable

Get rid of this compile warning:

arch/s390/kernel/crash_dump.c: In function 'copy_from_realmem':
arch/s390/kernel/crash_dump.c:48:6: warning: unused variable 'rc'
[-Wunused-variable]
  int rc;
      ^

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/atomic: use 'unsigned int' instead of 'unsigned long' for atomic_*_mask()
Chen Gang [Thu, 10 Oct 2013 02:31:22 +0000 (10:31 +0800)]
s390/atomic: use 'unsigned int' instead of 'unsigned long' for atomic_*_mask()

The type of 'v->counter' is always 'int', and related inline assembly
code also process 'int', so use 'unsigned int' instead of 'unsigned
long' for the 'mask'.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/gup: handle zero nr_pages case correctly
Heiko Carstens [Tue, 8 Oct 2013 07:29:09 +0000 (09:29 +0200)]
s390/gup: handle zero nr_pages case correctly

If [__]get_user_pages_fast() gets called with nr_pages == 0, the current
code would walk the page tables and pin as many pages until the first
invalid pte (or the kernel crashed while writing struct page pointers to
the pages array).
So let's handle at least the nr_pages == 0 case correctly and exit early.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/gup: reduce code duplication between [__]get_user_pages_fast functions
Heiko Carstens [Mon, 7 Oct 2013 14:14:50 +0000 (16:14 +0200)]
s390/gup: reduce code duplication between [__]get_user_pages_fast functions

Just call __get_user_pages_fast() from get_user_pages_fast() like powerpc.
This saves a lot of duplicated code.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm: do not initialize storage keys
Martin Schwidefsky [Mon, 7 Oct 2013 10:12:32 +0000 (12:12 +0200)]
s390/mm: do not initialize storage keys

With dirty and referenced bits implemented in software it is unnecessary
to initialize the storage key for every page. With this patch not a single
storage key operation is done for a system that does not use KVM.
For KVM set_pte_at/pgste_set_key will do the initialization for the guest
view of the storage key when the mapping for the page is established in
the host.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/bpf,jit: fix prolog oddity
Martin Schwidefsky [Fri, 4 Oct 2013 09:12:16 +0000 (11:12 +0200)]
s390/bpf,jit: fix prolog oddity

The prolog of functions generated by the bpf jit compiler uses an
instruction sequence with an "ahi" instruction to create stack space
instead of using an "aghi" instruction. Using the 32-bit "ahi" is not
wrong as the stack we are operating on is an order-4 allocation which
is always aligned to 16KB. But it is more consistent to use an "aghi"
as the stack pointer is a 64-bit value.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390: cleanup and add sanity checks to control register macros
Heiko Carstens [Mon, 30 Sep 2013 12:47:46 +0000 (14:47 +0200)]
s390: cleanup and add sanity checks to control register macros

- turn some macros into functions
- merge two almost identical versions for 32/64 bit
- add BUILD_BUG_ON() check to make sure the passed in array is large enough

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/eadm_sch: improve quiesce handling
Sebastian Ott [Wed, 25 Sep 2013 10:29:05 +0000 (12:29 +0200)]
s390/eadm_sch: improve quiesce handling

When quiescing an eadm subchannel make sure that outstanding IO is
cleared and potential timeout handlers are canceled.

Reviewed-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/pci: implement hibernation hooks
Sebastian Ott [Wed, 25 Sep 2013 10:27:43 +0000 (12:27 +0200)]
s390/pci: implement hibernation hooks

Implement architecture-specific functionality when a PCI device is
doing a hibernate transition.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/uaccess: always run the kernel in home space
Martin Schwidefsky [Tue, 24 Sep 2013 07:14:56 +0000 (09:14 +0200)]
s390/uaccess: always run the kernel in home space

Simplify the uaccess code by removing the user_mode=home option.
The kernel will now always run in the home space mode.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/bitops: rename find_first_bit_left() to find_first_bit_inv()
Heiko Carstens [Mon, 23 Sep 2013 10:01:44 +0000 (12:01 +0200)]
s390/bitops: rename find_first_bit_left() to find_first_bit_inv()

find_first_bit_left() and friends have nothing to do with the normal
LSB0 bit numbering for big endian machines used in Linux (least
significant bit has bit number 0).
Instead they use MSB0 bit numbering, where the most signficant bit has
bit number 0. So rename find_first_bit_left() and friends to
find_first_bit_inv(), to avoid any confusion.
Also provide inv versions of set_bit, clear_bit and test_bit.

This also removes the confusing use of e.g. set_bit() in airq.c which
uses a "be_to_le" bit number conversion, which could imply that instead
set_bit_le() could be used. But that is entirely wrong since the _le
bitops variant uses yet another bit numbering scheme.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/bitops: use flogr instruction to implement __ffs, ffs, __fls, fls and fls64
Heiko Carstens [Thu, 19 Sep 2013 09:05:32 +0000 (11:05 +0200)]
s390/bitops: use flogr instruction to implement __ffs, ffs, __fls, fls and fls64

Since z9 109 we have the flogr instruction which can be used to implement
optimized versions of __ffs, ffs, __fls, fls and fls64.
So implement and use them, instead of the generic variants.
This reduces the size of the kernel image (defconfig, -march=z9-109)
by 19,648 bytes.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/bitops: use generic find bit functions / reimplement _left variant
Heiko Carstens [Wed, 18 Sep 2013 09:45:36 +0000 (11:45 +0200)]
s390/bitops: use generic find bit functions / reimplement _left variant

Just like all other architectures we should use out-of-line find bit
operations, since the inline variant bloat the size of the kernel image.
And also like all other architecures we should only supply optimized
variants of the __ffs, ffs, etc. primitives.

Therefore this patch removes the inlined s390 find bit functions and uses
the generic out-of-line variants instead.

The optimization of the primitives follows with the next patch.

With this patch also the functions find_first_bit_left() and
find_next_bit_left() have been reimplemented, since logically, they are
nothing else but a find_first_bit()/find_next_bit() implementation that
use an inverted __fls() instead of __ffs().
Also the restriction that these functions only work on machines which
support the "flogr" instruction is gone now.

This reduces the size of the kernel image (defconfig, -march=z9-109)
by 144,482 bytes.
Alone the size of the function build_sched_domains() gets reduced from
7 KB to 3,5 KB.

We also git rid of unused functions like find_first_bit_le()...

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/s390dbf: use debug_level_enabled() where applicable
Hendrik Brueckner [Wed, 18 Sep 2013 15:21:34 +0000 (17:21 +0200)]
s390/s390dbf: use debug_level_enabled() where applicable

Refactor direct debug level comparisons with the (internal) s390db->level
member.  Use the debug_level_enabled() function instead.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/s390dbf: add debug_level_enabled() function
Hendrik Brueckner [Wed, 18 Sep 2013 15:21:34 +0000 (17:21 +0200)]
s390/s390dbf: add debug_level_enabled() function

Add the debug_level_enabled() function to check if debug events for
a particular level would be logged.  This might help to save cycles
for debug events that require additional information collection.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/bitops: optimize set_bit() for constant values
Heiko Carstens [Tue, 17 Sep 2013 07:48:44 +0000 (09:48 +0200)]
s390/bitops: optimize set_bit() for constant values

Since zEC12 we have the interlocked-access facility 2 which allows to
use the instructions ni/oi/xi to update a single byte in storage with
compare-and-swap semantics.
So change set_bit(), clear_bit() and change_bit() to generate such code
instead of a compare-and-swap loop (or using the load-and-* instruction
family), if possible.
This reduces the text segment by yet another 8KB (defconfig).

Alternatively the long displacement variants niy/oiy/xiy could have
been used, but the extended displacement field is usually not needed
and therefore would only increase the size of the text segment again.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/bitops: remove CONFIG_SMP / simplify non-atomic bitops
Heiko Carstens [Mon, 16 Sep 2013 14:22:05 +0000 (16:22 +0200)]
s390/bitops: remove CONFIG_SMP / simplify non-atomic bitops

Remove CONFIG_SMP from bitops code. This reduces the C code significantly
but also generates better code for the SMP case.

This means that for !CONFIG_SMP set_bit() and friends now also have
compare and swap semantics (read: more code). However nobody really cares
for !CONFIG_SMP and this is the trade-off to simplify the SMP code which we
do care about.

The non-atomic bitops like __set_bit() now generate also better code
because the old code did not have a __builtin_contant_p() check for the
CONFIG_SMP case and therefore always generated the inline assembly variant.
However the inline assemblies for the non-atomic case now got completely
removed since gcc can produce better code, which accesses less memory
operands.

test_bit() got also a bit simplified since it did have a
__builtin_constant_p() check, however two identical code pathes for each
case (written differently).

In result this mainly reduces the to be maintained code but is not very
relevant for code generation, since there are not many non-atomic bitops
usages that we care about.
(code reduction defconfig kernel image before/after: 560 bytes).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/atomic: various small cleanups
Heiko Carstens [Mon, 16 Sep 2013 09:07:49 +0000 (11:07 +0200)]
s390/atomic: various small cleanups

- add a typecheck to the defines to make sure they operate on an atomic_t
- simplify inline assembly constraints
- keep variable names common between functions

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/atomic: optimize atomic_add() for constant values
Heiko Carstens [Mon, 16 Sep 2013 08:44:54 +0000 (10:44 +0200)]
s390/atomic: optimize atomic_add() for constant values

If the interlocked-access facility 1 is available we can use the asi
and agsi instructions for interlocked updates if the to be added
value is a contanst and small (in the range of -128..127).
asi and agsi do not not return the old or new value, therefore these
instructions can only be used for atomic_(add|sub|inc|dec)[64].

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/qdio: fix atomic_sub() misusage
Heiko Carstens [Mon, 16 Sep 2013 04:59:50 +0000 (06:59 +0200)]
s390/qdio: fix atomic_sub() misusage

get_inbound_buffer_frontier() makes use of the return value of atomic_sub()
which shouldn't work, since atomic_sub() is supposed to return void.
This only works on s390 because atomic_sub() gets mapped to atomic_sub_return()
with a define without changing it's return value to void.

So use atomic_sub_return() instead of atomic_sub() in qeth code before fixing
atomic ops.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/kprobes: allow kprobes only on known instructions
Heiko Carstens [Fri, 13 Sep 2013 12:14:10 +0000 (14:14 +0200)]
s390/kprobes: allow kprobes only on known instructions

Since we have an in-kernel disassembler we can make sure that
there won't be any kprobes set on random data.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/kprobes: use insn_length helper function
Heiko Carstens [Fri, 13 Sep 2013 11:59:26 +0000 (13:59 +0200)]
s390/kprobes: use insn_length helper function

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/dis: move disassembler function prototypes to proper header file
Heiko Carstens [Fri, 13 Sep 2013 11:36:25 +0000 (13:36 +0200)]
s390/dis: move disassembler function prototypes to proper header file

Now that the in-kernel disassembler has an own header file move the
disassembler related function prototypes to that header file.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/dis: move common definitions to a header file
Suzuki K. Poulose [Thu, 29 Aug 2013 09:05:48 +0000 (14:35 +0530)]
s390/dis: move common definitions to a header file

The patch moves some of the definitions to a
header file. No functional changes involved.

I have retained the Copyright Statement from the
original file.

Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com>
[Heiko Carstens: rename s390-dis.h to dis.h]
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/dis: rename structures for unique types
Suzuki K. Poulose [Thu, 29 Aug 2013 09:04:10 +0000 (14:34 +0530)]
s390/dis: rename structures for unique types

Rename 'insn' and 'operand' structures to more canonical names
to avoid conflicts.

struct insn represents information about an instruction, including
the mnemonics, format and opcode.

struct operand represents the 'properties' and information on howto
interpret the operand value and doesn't contain the value.

We rename these structures for avoiding a global conflict.

i.e,

1,$s/struct insn/struct s390_insn/g
1,$s/struct operand/struct s390_operand/g

Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/atomic: make use of interlocked-access facility 1 instructions
Heiko Carstens [Wed, 11 Sep 2013 14:34:04 +0000 (16:34 +0200)]
s390/atomic: make use of interlocked-access facility 1 instructions

Same as for bitops: make use of the interlocked-access facility 1
instructions which allow to atomically update storage locations
without a compare-and-swap loop.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/atomic: implement atomic_sub_return() with atomic_add_return()
Heiko Carstens [Wed, 11 Sep 2013 12:28:47 +0000 (14:28 +0200)]
s390/atomic: implement atomic_sub_return() with atomic_add_return()

Get rid of the own atomic_sub_return() implementation. Otherwise we can't
make use of the interlocked-access facility 1 instructions for
atomic_sub_return(), since there is no "load and subtract" instruction
available.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/kprobes: have more correct if statement in s390_get_insn_slot()
Heiko Carstens [Mon, 2 Sep 2013 08:31:11 +0000 (10:31 +0200)]
s390/kprobes: have more correct if statement in s390_get_insn_slot()

When checking the insn address wether it is a kernel image or module
address it should be an if-else-if statement not two independent if
statements.
This doesn't really fix a bug, but matches s390_free_insn_slot().

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390: always set -march compiler option
Heiko Carstens [Wed, 11 Sep 2013 07:29:33 +0000 (09:29 +0200)]
s390: always set -march compiler option

Currently we only set the -march compiler option if the kbuild
system figured out that the compiler actually supports the selected
architecture (cc-option test).

In result this means that no -march compiler option is set when an
unsupported cpu architecture of the current compiler is selected.
The kernel compile will afterwards succeed but with the default
architecture instead of the (unsupported) selected one.

Change this behaviour, so compiles will fail if the compiler does
not support the selected cpu architecture.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/bitops: make use of interlocked-access facility 1 instructions
Heiko Carstens [Tue, 10 Sep 2013 13:35:39 +0000 (15:35 +0200)]
s390/bitops: make use of interlocked-access facility 1 instructions

Make use of the interlocked-access facility 1 that got added with the
z196 architecure.
This facilility added new instructions which can atomically update a
storage location without a compare-and-swap loop. E.g. setting a bit
within a "long" can be done with a single instruction.

The size of the kernel image gets ~30kb smaller. Considering that there
are appr. 1900 bitops call sites this means that each one saves about
15-16 bytes per call site which is expected.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agoDocs: arm64: booting: clarify boot requirements
Mark Rutland [Fri, 11 Oct 2013 13:52:07 +0000 (14:52 +0100)]
Docs: arm64: booting: clarify boot requirements

There are a few points in the arm64 booting document which are unclear
(such as the initial state of secondary CPUs), and/or have not been
documented (PSCI is a supported mechanism for booting secondary CPUs).

This patch amends the arm64 boot document to better express the
(existing) requirements, and to describe PSCI as a supported booting
mechanism.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Fu Wei <tekkamanninja@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agoarm64: Export __copy_in_user() to modules
Catalin Marinas [Mon, 7 Oct 2013 15:42:05 +0000 (16:42 +0100)]
arm64: Export __copy_in_user() to modules

This function may be called from loadable modules, so it needs
exporting.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Loc Ho <lho@apm.com>
11 years agoarm64: cmpxchg: implement cmpxchg64_relaxed
Will Deacon [Wed, 9 Oct 2013 14:54:28 +0000 (15:54 +0100)]
arm64: cmpxchg: implement cmpxchg64_relaxed

This patch introduces cmpxchg64_relaxed for arm64 using the existing
cmpxchg_local macro, which performs a cmpxchg operation (up to 64 bits)
without barrier semantics.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agoarm64: lockref: add support for lockless lockrefs using cmpxchg
Will Deacon [Wed, 9 Oct 2013 14:54:27 +0000 (15:54 +0100)]
arm64: lockref: add support for lockless lockrefs using cmpxchg

Our spinlocks are only 32-bit (2x16-bit tickets) and our cmpxchg can
deal with 8-bytes (as one would hope!).

This patch wires up the cmpxchg-based lockless lockref implementation
for arm64.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agoarm64: locks: introduce ticket-based spinlock implementation
Will Deacon [Wed, 9 Oct 2013 14:54:26 +0000 (15:54 +0100)]
arm64: locks: introduce ticket-based spinlock implementation

This patch introduces a ticket lock implementation for arm64, along the
same lines as the implementation for arch/arm/.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agoarm64: Fix memory layout typo
Catalin Marinas [Thu, 24 Oct 2013 11:00:28 +0000 (12:00 +0100)]
arm64: Fix memory layout typo

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>