Commit Graph

89411 Commits

Author SHA1 Message Date
Martin Schwidefsky
4560e7c331 s390/vtime: correct idle time calculation
Use the ACCESS_ONCE macro for both accesses to idle->sequence in the
loops to calculate the idle time. If only one access uses the macro,
the compiler is free to cache the value for the second access which
can cause endless loops.

Cc: stable@vger.kernel.org # 3.6+
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-10-31 09:52:52 +01:00
Martin Schwidefsky
7ab64a85e1 s390/time: fix get_tod_clock_ext inline assembly
The get_tod_clock_ext inline assembly does not specify its output
operands correctly. This can cause incorrect code to be generated.

Cc: stable@vger.kernel.org # 3.12
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-10-31 09:52:48 +01:00
Vladimir Murzin
b0c06d3335 powerpc/bpf: Support MOD operation
commit b6069a9570 (filter: add MOD operation) added generic
support for modulus operation in BPF.

This patch brings JIT support for PPC64

Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
Acked-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 16:19:21 +11:00
Vladimir Murzin
a40a2b6707 powerpc/bpf: Fix DIVWU instruction opcode
Currently DIVWU stands for *signed* divw opcode:

7d 2a 4b 96 	divwu   r9,r10,r9
7d 2a 4b d6 	divw    r9,r10,r9

Use the *unsigned* divw opcode for DIVWU.

Suggested-by: Vassili Karpov <av1474@comtv.ru>
Reviewed-by: Vassili Karpov <av1474@comtv.ru>
Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
Acked-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 16:19:20 +11:00
Sudeep KarkadaNagesha
a3e31b4588 of: Move definition of of_find_next_cache_node into common code.
Since the definition of_find_next_cache_node is architecture independent,
the existing definition in powerpc can be moved to driver/of/base.c

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 16:19:19 +11:00
Sudeep KarkadaNagesha
afaf539854 powerpc: Remove big endianness assumption in of_find_next_cache_node
Currently big endianness of the device tree data is assumed in
of_find_next_cache_node for 'handle' when calling of_find_node_by_phandle.

In preparation to move this function to common code, this patch fixes
the endianness using 'be32_to_cpup'

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 16:19:18 +11:00
Michael Neuling
7ba5fef7d9 powerpc/tm: Remove interrupt disable in __switch_to()
We currently turn IRQs off in __switch_to(0 but this is unnecessary as it's
already disabled in the caller.

This removes the IRQ disable but adds a check to make sure it is really off
in case this changes in future.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 16:19:17 +11:00
Philippe Bergheaud
d0cebfa650 powerpc: word-at-a-time optimization for 64-bit Little Endian
This is an optimization for the PowerPC in 64-bit
little-endian. Bit counting is used in find_zero(), instead
of the multiply and shift.

It is modelled after Alan Modra's PowerPC LE strlen patch
http://sourceware.org/ml/libc-alpha/2013-08/msg00097.html.

Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 16:19:16 +11:00
Philippe Bergheaud
9c662cad2f powerpc/bpf: BPF JIT compiler for 64-bit Little Endian
This enables the Berkeley Packet Filter JIT compiler
for the PowerPC running in 64bit Little Endian.

Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 16:19:15 +11:00
Dan Streetman
711b5138d5 powerpc: Only save/restore SDR1 if in hypervisor mode
Currently, when not in hypervisor mode the kernel
Oopses during suspend or hibernation when accessing
the SDR1 register, because it is only available
in hypervisor mode.  Access to it needs to be
protected in BEGIN/END_FW_FTR_SECTION.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reported-by: Jimmy Pan <jipan@redhat.com>
Tested-by: Jimmy Pan <jipan@redhat.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 12:37:29 +11:00
Cedric Le Goater
c81095a465 powerpc/nvram: Fix endian issue when using the partition length
When reading partitions, the length has to be translated from
big endian to the endian order of the host. Similarly, when writing
partitions, the length needs to be in big endian order.

The userspace tool 'nvram' needs a similar fix as it is reading
and writing partitions through /dev/nram :

    http://sourceforge.net/p/powerpc-utils/mailman/message/31571277/

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 12:37:28 +11:00
Cedric Le Goater
563c5d8af5 powerpc/nvram: Fix endian issue when reading the NVRAM size
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 12:37:27 +11:00
Cedric Le Goater
65f36f4149 powerpc/nvram: Scan partitions only once
nvram_scan_partitions() is called twice when initializing the "lnx,oops-log"
partition and the "ibm,rtas-log" partition. This fills the partition list
with duplicate entries. This patch moves the partition scan in the init
routine pseries_nvram_init_log_partitions() which is called only once.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-31 12:37:26 +11:00
Christian Daudt
005ff5fb07 ARM: bcm281xx: Add ARCH_BCM_MOBILE to bcm config
This patch (re)adds ARCH_BCM_MOBILE option to bcm_defconfig which was
accidentally removed by commit 2d58b26550 ('ARM: bcm_defconfig: Run
"make savedefconfig"')

Signed-off-by: Christian Daudt <bcm@fixthebug.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-30 17:41:01 -07:00
Hiroshi Doyu
4cca959326 ARM: tegra: fix Tegra114 IOMMU register address
The IOMMU node's reg property contains completely bogus values! Somehow,
this had no practical effect, despite the fact the IOMMU driver appears
to be writing to those registers. I suppose that since no HW modules is
actually at that address, the writes simply had no effect.

Note that I'm not CCing stable here, even though the problem exists as
far back as v3.9, simply because this patch doesn't fix any observed
issue, and I don't want to run the risk of suddenly writing to some
registers and causing a regression.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
[swarren, wrote commit description]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-30 17:38:27 -07:00
David Rientjes
d68ce0177c x86, hyperv: Fix build error due to missing <asm/apic.h> include
9e7827b5ea ("x86, hyperv: Get the local APIC timer frequency from the
hypervisor") breaks the build with some configs because apic.h isn't
directly included:

arch/x86/kernel/cpu/mshyperv.c: In function 'ms_hyperv_init_platform':
arch/x86/kernel/cpu/mshyperv.c:90:3: error: 'lapic_timer_frequency' undeclared (first use in this function)
arch/x86/kernel/cpu/mshyperv.c:90:3: note: each undeclared identifier is reported only once for each function it appears in

Fix it by including asm/apic.h.

Signed-off-by: David Rientjes <rientjes@google.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1310111604160.31170@chino.kir.corp.google.com
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-10-30 15:37:47 -07:00
Brian Norris
7e198197ec powerpc/mpc512x: remove unnecessary #if
Several functions are only ever referenced locally, so make them static.
Of those functions, many of them are protected by an #if. However, the
code which can compile fine in either case.

Now that (1) the unneeded code is marked 'static' and (2) the code is
only used under a C 'if (IS_ENABLED(CONFIG_FB_FSL_DIU))', the compiler
can automatically remove the unneeded code, and we don't need the #if or
the empty stub functions.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-10-30 22:56:10 +01:00
Anatolij Gustschin
2bf75084f6 powerpc/52xx: fix build breakage for MPC5200 LPBFIFO module
The MPC5200 LPBFIFO driver requires the bestcomm module to be
enabled, otherwise building will fail. Fix it.

Cc: <stable@vger.kernel.org> # 3.10+
Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-10-30 22:34:56 +01:00
Wolfram Sang
509a02df44 Kind of revert "powerpc: 52xx: provide a default in mpc52xx_irqhost_map()"
This more or less reverts commit 6391f697d4.
Instead of adding an unneeded 'default', mark the variable to prevent
the false positive 'uninitialized var'. The other change (fixing the
printout) needs revert, too. We want to know WHICH critical irq failed,
not which level it had.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Anatolij Gustschin <agust@denx.de>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-10-30 22:34:14 +01:00
Gerhard Sittig
45d20e8348 powerpc/mpc512x: silence build warning upon disabled DIU
a disabled Kconfig option results in a reference to a not implemented
routine when the IS_ENABLED() macro is used for both conditional
implementation of the routine as well as a C language source code test
at the call site -- the "if (0) func();" construct only gets eliminated
later by the optimizer, while the compiler already has emitted its
warning about "func()" being undeclared

provide an empty implementation for the mpc512x_setup_diu() and
mpc512x_init_diu() routines in case of the disabled option, to avoid the
compiler warning which is considered fatal and breaks compilation

the bug appeared with commit 2abbbb63c9
"powerpc/mpc512x: move common code to shared.c file", how to reproduce:

  make mpc512x_defconfig
  echo CONFIG_FB_FSL_DIU=n >> .config && make olddefconfig
  make

    CC      arch/powerpc/platforms/512x/mpc512x_shared.o
  .../arch/powerpc/platforms/512x/mpc512x_shared.c: In function 'mpc512x_init_early':
  .../arch/powerpc/platforms/512x/mpc512x_shared.c:456:3: error: implicit declaration of function 'mpc512x_init_diu' [-Werror=implicit-function-declaration]
  .../arch/powerpc/platforms/512x/mpc512x_shared.c: In function 'mpc512x_setup_arch':
  .../arch/powerpc/platforms/512x/mpc512x_shared.c:469:3: error: implicit declaration of function 'mpc512x_setup_diu' [-Werror=implicit-function-declaration]
  cc1: all warnings being treated as errors
  make[4]: *** [arch/powerpc/platforms/512x/mpc512x_shared.o] Error 1

Signed-off-by: Gerhard Sittig <gsi@denx.de>
CC: <stable@vger.kernel.org> # v3.11
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-10-30 22:34:02 +01:00
Linus Torvalds
12aee278b5 Merge branch 'akpm' (fixes from Andrew Morton)
Merge three fixes from Andrew Morton.

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  memcg: use __this_cpu_sub() to dec stats to avoid incorrect subtrahend casting
  percpu: fix this_cpu_sub() subtrahend casting for unsigneds
  mm/pagewalk.c: fix walk_page_range() access of wrong PTEs
2013-10-30 14:27:10 -07:00
Greg Thelen
bd09d9a351 percpu: fix this_cpu_sub() subtrahend casting for unsigneds
this_cpu_sub() is implemented as negation and addition.

This patch casts the adjustment to the counter type before negation to
sign extend the adjustment.  This helps in cases where the counter type
is wider than an unsigned adjustment.  An alternative to this patch is
to declare such operations unsupported, but it seemed useful to avoid
surprises.

This patch specifically helps the following example:
  unsigned int delta = 1
  preempt_disable()
  this_cpu_write(long_counter, 0)
  this_cpu_sub(long_counter, delta)
  preempt_enable()

Before this change long_counter on a 64 bit machine ends with value
0xffffffff, rather than 0xffffffffffffffff.  This is because
this_cpu_sub(pcp, delta) boils down to this_cpu_add(pcp, -delta),
which is basically:
  long_counter = 0 + 0xffffffff

Also apply the same cast to:
  __this_cpu_sub()
  __this_cpu_sub_return()
  this_cpu_sub_return()

All percpu_test.ko passes, especially the following cases which
previously failed:

  l -= ui_one;
  __this_cpu_sub(long_counter, ui_one);
  CHECK(l, long_counter, -1);

  l -= ui_one;
  this_cpu_sub(long_counter, ui_one);
  CHECK(l, long_counter, -1);
  CHECK(l, long_counter, 0xffffffffffffffff);

  ul -= ui_one;
  __this_cpu_sub(ulong_counter, ui_one);
  CHECK(ul, ulong_counter, -1);
  CHECK(ul, ulong_counter, 0xffffffffffffffff);

  ul = this_cpu_sub_return(ulong_counter, ui_one);
  CHECK(ul, ulong_counter, 2);

  ul = __this_cpu_sub_return(ulong_counter, ui_one);
  CHECK(ul, ulong_counter, 1);

Signed-off-by: Greg Thelen <gthelen@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-10-30 14:27:03 -07:00
Olof Johansson
6216650a7a BCM changes for 3.13/soc. A number of cleanup related changes.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJScKOTAAoJEPYb7NoJr+nL+fwP/1bZKlbqYURXdrjLxHTZGKp3
 WBpo8KUYp80nAZpw1SLoOk/78ciulQ0VLifWMebzMd/1qXXnek71jfYusbSb7MeM
 e70y9TRtXrfkDPxL12XTXIf6F7JieGtVx0S2jJsGsofmM0w6b723KwZAYZgxACYB
 Ec7TSzwaTlBBCI+ZyouS8e4CkS0x/0Mpkj8Ym8FDhKnwTs/mtD9kOcgVBzfz0Bt8
 ExtiAsASeDvxUq5zskOiGiEhaNlhbQHd8etLIHEBTRreYQRg8nWTI+fdKKqwHKi0
 qHm7p/ZcVQUgqf/2EjEfbEa0sQrQKrH82oaJirY3A6QrIEVQ5OVZCThkcvVV5Bxo
 w1jDJcxYl2PEM/awR1YkRT3KQKb13J2PxbLFTYnKyhKgZz4mvB/NnjI1AuskTiS8
 ddYfJ5apOqtZBqIYQvM6fv69mSWNinhmOqze14ulxGn+U6CVEYsGcQY1QvgA7T+c
 0JAAUJwgRsJ+jIDjzx4EJFYCEpdRY8NAKNnZmPr8maP7DIttsbZd0KjWTTqg1Y1N
 RHJkxJtnSxJYxfXkgpADJJNjcPdYxqfoYSpcRrGpFM3XLyCPKu2FiahpACyjua3W
 JPzRGuYr4I51D16uHiYLxkDSwBKLYBlzyi5bzb+hed9nhoeynvOYtZZkuVgqVRKT
 QJwnbUpxU1m870cNpAm/
 =fAes
 -----END PGP SIGNATURE-----

Merge tag 'bcm-for-3.13-soc2' of git://github.com/broadcom/bcm11351 into next/soc

From Christian Daudt, BCM changes for 3.13/soc. Mostly cleanups and
renaming of kernel config options, pushing down the mobile platforms
one level in the naming scheme, keeping ARCH_BCM as a wider family
config option.

* tag 'bcm-for-3.13-soc2' of git://github.com/broadcom/bcm11351:
  ARM: bcm_defconfig: Run "make savedefconfig"
  ARM: bcm281xx: Add ARCH Timers to config
  rename ARCH_BCM to ARCH_BCM_MOBILE (mach-bcm)
  ARM: bcm281xx: more descriptive machine string
  ARM: bcm281xx: Enable GPIO driver

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-30 14:03:39 -07:00
Thomas Petazzoni
f24b56cbcd ARM: kirkwood: add support for OpenBlocks A7 platform
The OpenBlocks A7 board is designed and sold by PlatHome, and based on
a Kirkwood 6283 Marvell SoC. It is quite similar to the OpenBlocks A6
already supported in the kernel, with the following main differences:

 - The A6 uses a RTC on I2C, while the A7 uses the internal SoC RTC.

 - The A6 has one Ethernet port, while the A7 has two Ethernet ports

 - The A6 has only one USB port, while the A7 integrates a USB hub,
   which provides two front-side USB port, and an internal USB port as
   well.

 - The A6 has 512 MB of RAM, while the A7 has 1 GB of RAM.

 - Slightly different GPIOs for some functions.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-10-30 19:55:34 +00:00
Linus Torvalds
96d33b086b Fixes for the 3.12 debugfs problem---removing the duplicate directory
name, and using a better the error code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJScOswAAoJEBvWZb6bTYbyCO8P/RoJy4EgsEjv9Qxfr+wfHXX0
 QOz/7fqEsFFMDh1Fiyjvg9uNYj5jQO9lzQfX0ea0uc4svIMUBWaAlyQVL/U0igkp
 2DrIoRh1aNa9Lt4RDsGswapreJylGgyhADa2W9r1tlPna7dlaPCEHGxZBR112KJc
 R9t0PMIq7NBGvPGBhiOkjeDVlqWUrEQvxOQW8ZQZw2pBc54DSreY9nq3n1dIhqMp
 gxpAKi3h5YWK8lzFxFSOLKnRqC+5SAUj2Bk8g37ZESJXp7bpmn74DpuK4KiLLokP
 V3rUvHO1p0eZSx0QWuV9QrPV6Q1VVuhLEinWnCdejhXUqk/tCR5EOMKMcHIk2xad
 6ApE7a4UPs9VmXp5Ry7/k6lorOrBuvwArPwJOCpCN7zAN1gEmmfFg3KbFdtbaIgx
 g4hEtqWQ6VULBxyDXCFHYbXGLS22kgWoQCR3ToGqbjzuZmZph49NbLjlt6d7o6w0
 n+UMZqcpLA9eUhq4Yi0IAGe45pizm5rdC4xRpbH7bK7WmKywYw+zf+JSOheTLwtm
 ER0sTmcyMSP68ysnJCLgh4hYf1lxoaQ/8SEdh331VIrThmHYyWGZD4Ol9YKg5xwU
 Yzd3wedxYYIiJ1vFfZykMWUT9zLU3feMDvq2s2maqg+uV/b4uPfZhwnFLBU+PZKC
 cxkXsb/7oZ//tmGF1MEm
 =GwaF
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fixes from Paolo Bonzini:
 "Fixes for the 3.12 debugfs problem - removing the duplicate directory
  name, and using a better the error code"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: use a more sensible error number when debugfs directory creation fails
  KVM: Fix modprobe failure for kvm_intel/kvm_amd
2013-10-30 12:25:15 -07:00
Dan Carpenter
201f99f170 uml: check length in exitcode_proc_write()
We don't cap the size of buffer from the user so we could write past the
end of the array here.  Only root can write to this file.

Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-10-30 12:24:49 -07:00
Sudeep KarkadaNagesha
248f0e7f5f ARM64: simplify cpu_read_bootcpu_ops using OF/DT helper
Once the cpu_logical_map for any logical cpu is populated with the
corresponding physical identifier(i.e. mpidr), it's device node can
be retrieved using the DT helper 'of_get_cpu_node'. Currently the
device tree parsing code to get boot cpu node is duplicated in
'cpu_read_bootcpu_ops'.

This patch replaces the code parsing the device tree for the boot
cpu with of_get_cpu_node.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-30 17:54:49 +00:00
Markos Chandras
13b7ea6377 MIPS: malta: Fix GIC interrupt offsets
The GIC interrupt offsets are calculated based on the value of NR_CPUS.
However, this is wrong because NR_CPUS may or may not contain the real
number of the actual cpus present in the system. We fix that by using
the 'nr_cpu_ids' variable which contains the real number of cpus in
the system. Previously, an MT core (eg with 8 VPEs) will fail to boot if
NR_CPUS was > 8 with the following errors:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at kernel/irq/chip.c:670 __irq_set_handler+0x15c/0x164()
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W    3.12.0-rc5-00087-gced5633 5
Stack : 00000006 00000004 00000000 00000000 00000000 00000000 807a4f36 00000053
          807a0000 00000000 80173218 80565aa8 00000000 00000000 00000000 0000000
          00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000
          00000000 00000000 00000000 8054fd00 8054fd94 80500514 805657a7 8016eb4
          807a0000 80500514 00000000 00000000 80565aa8 8079a5d8 80565766 8054fd0
          ...
Call Trace:
[<801098c0>] show_stack+0x64/0x7c
[<8049c6b0>] dump_stack+0x64/0x84
[<8012efc4>] warn_slowpath_common+0x84/0xb4
[<8012f00c>] warn_slowpath_null+0x18/0x24
[<80173218>] __irq_set_handler+0x15c/0x164
[<80587cf4>] arch_init_ipiirq+0x2c/0x3c
[<805880c8>] arch_init_irq+0x3c4/0x4bc
[<80588e28>] init_IRQ+0x3c/0x50
[<805847e8>] start_kernel+0x230/0x3d8

---[ end trace 4eaa2a86a8e2da26 ]---

This is now fixed and the Malta board can boot with any NR_CPUS value
which also helps supporting more processors in a single kernel binary.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6091/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-30 15:43:18 +01:00
Sudeep KarkadaNagesha
6e15d0e04b ARM64: DT: define ARM64 specific arch_match_cpu_phys_id
OF/DT core library provides architecture specific hook to match the
logical cpu index with the corresponding physical identifier.

On ARM64, the MPIDR_EL1 contains specific bitfields(MPIDR_EL1.Aff{3..0})
which uniquely identify a CPU, in addition to some non-identifying
information and reserved bits. The ARM cpu binding defines the 'reg'
property to only contain the affinity bits, and any cpu nodes with other
bits set in their 'reg' entry are skipped.

This patch overrides the weak definition of arch_match_cpu_phys_id
with ARM64 specific version using MPIDR_EL1.Aff{3..0} as cpu physical
identifiers.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-30 12:10:37 +00:00
Mark Salter
c04e8e2fe5 arm64: allow ioremap_cache() to use existing RAM mappings
Some drivers (ACPI notably) use ioremap_cache() to map an area which could
either be outside of kernel RAM or in an already mapped reserved area of
RAM. To avoid aliases with different caching attributes, ioremap() does
not allow RAM to be remapped. But for ioremap_cache(), the existing kernel
mapping may be used.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-30 12:10:37 +00:00
Tim Gardner
d780a31271 KVM: Fix modprobe failure for kvm_intel/kvm_amd
The x86 specific kvm init creates a new conflicting
debugfs directory which causes modprobe issues
with kvm_intel and kvm_amd. For example,

sudo modprobe kvm_amd
modprobe: ERROR: could not insert 'kvm_amd': Bad address

The simplest fix is to just rename the directory. The following
KVM config options are set:

CONFIG_KVM_GUEST=y
CONFIG_KVM_DEBUG_FS=y
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_HAVE_KVM_EVENTFD=y
CONFIG_KVM_APIC_ARCHITECTURE=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_HAVE_KVM_MSI=y
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_KVM_AMD=m
CONFIG_KVM_DEVICE_ASSIGNMENT=y

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
[Change debugfs directory name. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-10-30 12:10:42 +01:00
Tim Kryger
2d58b26550 ARM: bcm_defconfig: Run "make savedefconfig"
Several of the options in bcm_defconfig have gotten out of date so
regenerate it with "make savedefconfig" to keep things fresh.

Signed-off-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
2013-10-29 23:09:10 -07:00
Christian Daudt
e84dfa26a0 ARM: bcm281xx: Add ARCH Timers to config
Add HAVE_ARM_ARCH_TIMER to Broadcom Kconfig as it is
required for some Mobile SoCs.

Signed-off-by: Christian Daudt <bcm@fixthebug.org>
Reviewed-by: Markus Mayer <mmayer@broadcom.com>
Reviewed-by: Mark Hambleton <mahamble@broadcom.com>
Reviewed-by: James King <jamesk@broadcom.com>
2013-10-29 23:09:10 -07:00
Christian Daudt
badb923898 rename ARCH_BCM to ARCH_BCM_MOBILE (mach-bcm)
Currently ARCH_BCM has been used for Broadcom
Mobile V7 based SoCs. In order to allow other Broadcom
SoCs to also use mach-bcm directory and files, this patch
renames the original ARCH_BCM to ARCH_BCM_MOBILE, and
uses ARCH_BCM to define any Broadcom chip residing
in mach-bcm directory.

Signed-off-by: Christian Daudt <bcm@fixthebug.org>
Acked-by: Olof Johansson <olof@lixom.net>

Changes from v2:
 - switch ARCH_MULTIPLATFORM from select to depends
 - remove 'default y' from BCM_MOBILE

Changes from v1:
 - fix alpha ordering in dts/Makefile
 - break into 4 patches for separate subsys
2013-10-29 23:07:57 -07:00
Vasant Hegde
50bd6153d1 powerpc/powernv: Code update interface
Code update interface for powernv platform. This provides
sysfs interface to pass new image, validate, update and
commit images.

This patch includes:
  - Below OPAL APIs for code update
    - opal_validate_flash()
    - opal_manage_flash()
    - opal_update_flash()

  - Create below sysfs files under /sys/firmware/opal
    - image		: Interface to pass new FW image
    - validate_flash	: Validate candidate image
    - manage_flash	: Commit/Reject operations
    - update_flash	: Flash new candidate image

Updating Image:
  "update_flash" is an interface to indicate flash new FW.
It just passes image SG list to FW. Actual flashing is done
during system reboot time.

Note:
  - SG entry format:
    I have kept version number to keep this list similar to what
    PAPR is defined.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:12:02 +11:00
Vasant Hegde
6f68b5e2c6 powerpc/powernv: Create opal sysfs directory
Create /sys/firmware/opal directory. We wil use this
interface to fetch opal error logs, firmware update, etc.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:09:34 +11:00
Anton Blanchard
ef1313deaf powerpc: Add VMX optimised xor for RAID5
Add a VMX optimised xor, used primarily for RAID5. On a POWER7 blade
this is a decent win:

   32regs    : 17932.800 MB/sec
   altivec   : 19724.800 MB/sec

The bigger gain is when the same test is run in SMT4 mode, as it
would if there was a lot of work going on:

   8regs     :  8377.600 MB/sec
   altivec   : 15801.600 MB/sec

I tested this against an array created without the patch, and also
verified it worked as expected on a little endian kernel.

[ Fix !CONFIG_ALTIVEC build -- BenH ]

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:02:28 +11:00
Geert Uytterhoeven
07fb41a752 powerpc/kexec: kexec_sequence() is in misc_64.S
Correct reference to the location of the kexec_sequence() assembly helper.
There never was a kexec_stub.S in mainline.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:02:18 +11:00
Anton Blanchard
bbe30b3b57 powerpc: Use 32 bit loads and stores when operating on condition register values
The condition register (CR) is a 32 bit quantity so we should use
32 bit loads and stores.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:02:14 +11:00
Anton Blanchard
65508689d4 powerpc: Enable virtio on ppc64 and pseries configs
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:02:09 +11:00
Anton Blanchard
b7697592ef powerpc: Enable multipath modules on ppc64 and pseries
Enable a few modules required to boot on a POWER multipath
box.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:02:03 +11:00
Anton Blanchard
4d16bd39c0 powerpc: sync ppc64, ppc64e and pseries configs
Run savedefconfig over the ppc64, ppc64e and pseries config

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:01:56 +11:00
Anton Blanchard
686245bee9 powerpc: Use -mcpu=power7 on ppc64 little endian builds
Using -mcpu=power7 allows gcc to use a number of new instructions
including 64 bit byte reversed loads.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:01:50 +11:00
Anton Blanchard
733187e295 powerpc/pseries: Fix dedicated processor partition detection
commit f13c13a005 (powerpc: Stop using non-architected shared_proc
field in lppaca) fixed a potential issue with shared/dedicated
partition detection. The old method of detection relied on an
unarchitected field (shared_proc), and this patch switched
to using something architected (a non zero yield_count).

Unfortunately the assertion in the Linux header that yield_count
is only non zero on shared processor partitions is not true. It
turns out dedicated processor partitions can increment yield_count
and as such we falsely detect dedicated partitions as shared.

Fix the comment, and switch back to using the old method.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:01:43 +11:00
Tom Musta
dbc2fbd7c2 powerpc: Fix Unaligned LE Floating Point Loads and Stores
This patch addresses unaligned single precision floating point loads
and stores in the single-step code.  The old implementation
improperly treated an 8 byte structure as an array of two 4 byte
words, which is a classic little endian bug.

Signed-off-by: Tom Musta <tmusta@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:01:36 +11:00
Tom Musta
6506b4718b powerpc: Fix Unaligned Loads and Stores
This patch modifies the unaligned access routines of the sstep.c
module so that it properly reverses the bytes of storage operands
in the little endian kernel kernel.   This is implemented by
breaking an unaligned little endian access into a combination of
single byte accesses plus an overal byte reversal operation.

Signed-off-by: Tom Musta <tmusta@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:01:30 +11:00
Tom Musta
630c8a5fc9 powerpc: Enable Little Endian Alignment Handler for Float Pair Instructions
This patch enables alignment handling for the load/store floating point
pair instructions (lfdp, lfdpx, stfdp, stfdpx).  The handler routine
is properly coded and only needs to be enabled.

Signed-off-by: Tom Musta <tmusta@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:01:23 +11:00
Tom Musta
075f6311af powerpc: Fix Handler of Unaligned Load/Store Strings
The alignment handler is incorrect for unaligned string instructions
in little endian mode.  These instructions access data as arrays of
bytes and thus are endian neutral.  However, the routine also handles
the load/store multiple instructions, which are NOT endian neutral.

This patch toggles the byte swapping flag for the string instructions
in little endian builds.  This effectively disables the byte swapping
logic.

Signed-off-by: Tom Musta <tmusta@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:01:17 +11:00
Anton Blanchard
df015604cf powerpc/pseries: Fix endian issues in pseries iommu code
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:01:10 +11:00
Anton Blanchard
3e7cec6b17 powerpc: Fix little endian issue in OF PCI scan
This issue was causing the QEMU emulated USB device to fail dring
PCI probe.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:01:04 +11:00
Prarit Bhargava
411cabf79e powerpc/vio: use strcpy in modalias_show
Commit e82b89a6f1 used strcat instead of
strcpy which can result in an overflow of newlines on the buffer.

Signed-off-by: Prarit Bhargava
Cc: benh@kernel.crashing.org
Cc: ben@decadent.org.uk
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:00:57 +11:00
Alistair Popple
ecb35c3943 powerpc: Fix 64K page size support for PPC44x
PPC44x supports page sizes other than 4K however when 64K page sizes
are selected compilation fails. This is due to a change in the
definition of pgtable_t introduced by the following patch:

commit 5c1f6ee9a3
Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
powerpc: Reduce PTE table memory wastage

The above patch only implements the new layout for PPC64 so it doesn't
compile for PPC32 with a 64K page size. Ideally we should implement
the same layout for PPC32 however for the meantime this patch reverts
the definition of pgtable_t for PPC32.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:00:51 +11:00
Michael Ellerman
90890b1ef5 powerpc: FA_DUMP depends on KEXEC
If you try and build the FA_DUMP code with CONFIG_KEXEC=n, you see
errors such as the following:

arch/powerpc/kernel/fadump.c
  408:2: error: 'crashing_cpu' undeclared (first use in this function)
  410:2: error: implicit declaration of function 'crash_save_vmcoreinfo'
  513:22: error: storage size of 'prstatus' isn't known
  520:2: error: implicit declaration of function 'elf_core_copy_kernel_regs'
  521:36: error: 'KEXEC_CORE_NOTE_NAME' undeclared (first use in this function)
  624:49: error: 'note_buf_t' undeclared (first use in this function)
  872:2: error: implicit declaration of function 'paddr_vmcoreinfo_note'
  874:18: error: 'vmcoreinfo_max_size' undeclared (first use in this function)

This is because although FA_DUMP doesn't use kexec as the actual reboot
mechanism, it does use parts of the kexec code to assemble/disassemble
the crash image.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:00:44 +11:00
Vaishnavi Bhat
b83941798c powerpc: Fix a typo in comments of va to pa conversion
This patch fixes typo in comments virtual to physical
address conversion.

Signed-off-by: Vaishnavi Bhat <vaishnavi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:00:38 +11:00
Robert Jennings
b88c4767d9 powerpc: Move local setup.h declarations to arch includes
Move the few declarations from arch/powerpc/kernel/setup.h
into arch/powerpc/include/asm/setup.h.  This resolves a
sparse warning for arch/powerpc/mm/numa.c which defines
do_init_bootmem() but can't include the setup.h header
in the prior path.

Resolves:
arch/powerpc/mm/numa.c:998:13:
        warning: symbol 'do_init_bootmem' was not declared.
                 Should it be static?

Signed-off-by: Robert C Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:00:31 +11:00
Robert Jennings
ec32dd663d powerpc: Fix warnings for arch/powerpc/mm/numa.c
Simple fixes for sparse warnings in this file.

Resolves:
arch/powerpc/mm/numa.c:198:24:
        warning: Using plain integer as NULL pointer

arch/powerpc/mm/numa.c:1157:5:
       warning: symbol 'hot_add_node_scn_to_nid' was not declared.
                Should it be static?

arch/powerpc/mm/numa.c:1238:28:
       warning: Using plain integer as NULL pointer

arch/powerpc/mm/numa.c:1538:6:
       warning: symbol 'topology_schedule_update' was not declared.
                Should it be static?

Signed-off-by: Robert C Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:00:24 +11:00
Paul Mackerras
f5467e28d4 powerpc/boot: Don't change link address for OF-based platforms
Commit c55aef0e5b ("powerpc/boot: Change the load address for the
wrapper to fit the kernel") adjusts the wrapper address unnecessarily
for platforms that use arch/powerpc/boot/of.c, since the code there
allocates space for the kernel wherever it can find it and doesn't
necessarily load the kernel at address 0.  Changing the link address
is actually harmful since it can cause the zImage to overlap with
Open Firmware and thus fail to boot.

To fix this, we set make_space to n for all of the platforms that
use of.o.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 16:00:17 +11:00
Stephen Rothwell
1400b4204c powerpc: Add includes to fix powernv/rng.c build
Caused by commit a4da0d50b2 ("powerpc: Implement
arch_get_random_long/int() for powernv") from the powerpc tree
interacting with commit b5b4bb3f6a ("of: only include prom.h on sparc")
from the dt-rh tree.

I added this merge fix patch (which will need to be sent to Linus when
these two trees get merged, or could be applied now to the powerpc tree):

[ Also add linux/smp.h to get cpu_to_chip_id -- BenH ]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-30 15:59:04 +11:00
H Hartley Sweeten
e55f7cd246 usb: ohci: remove ep93xx bus glue platform driver
Convert ep93xx to use the OHCI platform driver and remove the
ohci-ep93xx bus glue driver.

Enable CONFIG_OHCI_HCD_PLATFORM in the ep93xx_defconfig so that USB
is still enabled by default on the EP93xx platform.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Olof Johansson <olof@lixom.net>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29 16:43:37 -07:00
Benjamin Herrenschmidt
2f29e3a561 Merge remote-tracking branch 'scott/next' into next
Highlights include corenet board file consolidation, the ability to run
userspaces with lwsync on e500v1/v2, some cleanup patches that other KVM
patches will build on, support for stripped-down e6500 emulation targets,
and some fixes of minor longstanding issues.
2013-10-30 10:26:23 +11:00
Olof Johansson
6275a9be78 Few device tree changes that fix boot time warnings and
make panda display work with recent u-boot.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJScC4gAAoJEBvUPslcq6Vz8AcP/220RS7XQfFIbV7rvv+jOm0j
 MKnhBiUTO5H7YIbow440MH+oD4CbwCKuI/APZMQfiFTBUE95EPBQOy4KgKWDxVkp
 rMmg3zlcr0Eowz/6/h9tCgt7N8rk0NCv+UP0VEiGoSpFTFRy2ir3F9gAuvQOu9gz
 zGjiXDfgZAnjFZMsMYm5nIj5E0lqyhgPfbzRAq1e5k1YcBxSbYZHbbSA44kSZOTu
 gUSOb2gTzOjVs/ZxHIQzxhoQo/iT7q+sthpm5rozP9yiN49jlu2nhChdfV4A7mXi
 zpoSKb9VnJqjmoJj6obnDiguKMX8SqcMhJ1t7jXgVQwgTG653shPVHwrbBQqKqN1
 lbQziKNF8J7u88XGZcesWL1xgng7tNOWfUnjw9gQmpbXXlJtbnuhNiipiL27rjNb
 /g5gmTu8CMp73SxuIWsdbHLNo0YGOnHuqfeqtTrpJ26tqiZPHsNM8kydTyCEIWMV
 EaEon5BQ9MJVk8FjU5I8H+LMvNawNl0b3TJscwao2zLlZo/AWGFmx0BCmLnkKVq8
 oiJcIDaHgPpWhgktM2ua2+Kk6v44vBtRvgF6dFJuDJLgfG1ILTDSILbwFup5E/c6
 dQdXeqdLfwwoSI7Zox/pC7coybm9rzsGg0mqVA9ycUWioUSD7gEf+/1zapgwJYgx
 Xt6TQ1jcy44SPDJvAjt7
 =MMCL
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.13/dt-fixes-for-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt

From Tony Lindgren:
Few device tree changes that fix boot time warnings and
make panda display work with recent u-boot.

* tag 'omap-for-v3.13/dt-fixes-for-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: omap4-panda: add DPI pinmuxing
  ARM: dts: AM33xx: Add RNG node
  ARM: dts: AM33XX: Add hwspinlock node
  ARM: dts: OMAP5: Add hwspinlock node
  ARM: dts: OMAP4: Add hwspinlock node

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-29 16:11:03 -07:00
Benjamin Herrenschmidt
bcd77ffc5d Merge branch 'for-kvm' into next
Add Paul's fix for 32-bit register corruption in the new FP code
2013-10-30 09:47:01 +11:00
Tomi Valkeinen
0352bd1f04 ARM: dts: omap4-panda: add DPI pinmuxing
New u-boot versions no longer set the pinmuxing for Panda's DPI output,
and the muxing has to be done in the .dts file.

Add pinmuxing for DPI and TFP410. Without these, the DVI output on Panda
does not work with recent u-boot.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-10-29 14:24:34 -07:00
Lokesh Vutla
ed845d6b78 ARM: dts: AM33xx: Add RNG node
Add the AM33xx RNG module's device tree data.
Also add Documentation file describing the data
for the RNG module.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-10-29 13:58:51 -07:00
Suman Anna
d4cbe80db4 ARM: dts: AM33XX: Add hwspinlock node
Add the hwspinlock device tree node for AM33xx family
of SoCs.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-10-29 13:51:38 -07:00
Suman Anna
fe0e09e48c ARM: dts: OMAP5: Add hwspinlock node
Add the hwspinlock device tree node for OMAP5 SoCs.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-10-29 13:51:38 -07:00
Suman Anna
04c7d924eb ARM: dts: OMAP4: Add hwspinlock node
Add the hwspinlock device tree node for OMAP4 family
of SoCs.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-10-29 13:51:37 -07:00
Ralf Baechle
dc73e4c1b6 MIPS: traps: Reformat notify_die invocations to 80 columns.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:37 +01:00
Leonid Yegoshin
83e4da1ed4 MIPS: Print correct PC in trace dump after NMI exception
An NMI exception delivered from YAMON delivers the PC in ErrorPC
instead of EPC. It's also necessary to clear the Status.BEV
bit for the page fault exception handler to work properly.

[ralf@linux-mips: Let the assembler do the loading of the mask value rather
than the convoluted explicit %hi/%lo manual relocation sequence from the
original patch.]

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6035/
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/6084/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:35 +01:00
Leonid Yegoshin
d9f897c912 MIPS: kernel: cpu-probe: Report CPU id during probe
Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6023/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:33 +01:00
Deng-Cheng Zhu
40b15b2808 MIPS: Remove unused defines in piix4.h
The PIIX4_ICTLR* and PIIX4_OCW* defines are not used by any other files.
Remove them.

The only file (other than fixup-malta.c which includes piix4.h in patch #1)
containing "#include <asm/mips-boards/piix4.h>" is
arch/mips/mti-malta/malta-int.c whose first version is actually
"1da177e4c3:arch/mips/mips-boards/malta/malta_int.c". In that version, in
the function get_int(), things in piix4.h are used. But now malta-int.c no
longer needs those stuff.

Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6032/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:31 +01:00
Deng-Cheng Zhu
70002f76db MIPS: Get rid of hard-coded values for Malta PIIX4 fixups
Make the code more readable by using defines.

Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6031/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:28 +01:00
Steven J. Hill
f7886e8754 MIPS: Always register R4K clock when selected
Always register the R4K clocksource when CONFIG_CSRC_R4K is selected,
regardless of selected support for other clocksources. The kernel will
select the best clocksource based on their ratings, making it safe to
register R4K unconditionally and use it as a fallback should the
kernel be run on a system where other selected clocksources are
inoperable.

Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6024/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:26 +01:00
Ralf Baechle
14bd8c0820 MIPS: Loongson: Get rid of Loongson 2 #ifdefery all over arch/mips.
It was ugly.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:24 +01:00
Ralf Baechle
7b784c634b MIPS: cacheops.h: Increase indentation by one tab.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:22 +01:00
Markos Chandras
c1724c8997 MIPS: Remove bogus BUG_ON()
Checking for n<0 && n>9 makes no sense because it can never
be true. Moreover, we can have up to 64 vectored interrupts
so BUG_ON(n>9) was wrong anyway.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Acked-by: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5909/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:20 +01:00
Ralf Baechle
a6e95a86e0 MIPS: PowerTV: Remove support code.
Nobody seems to care about this platform anymore and my attempts to find
somebody willing to provide some tlc for PowerTV have failed so far.

So let's nuke the bloody thing.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/5910/
2013-10-29 21:25:17 +01:00
Ralf Baechle
1d7bf993e0 MIPS: ftrace: Add support for syscall tracepoints.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:16 +01:00
Ralf Baechle
0dfa95aaa8 MIPS: ptrace: Switch syscall reporting to tracehook_report_syscall_entry().
Set ret just so __must_check is satisfied but don't use the variable for
anything yet.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:15 +01:00
Ralf Baechle
bec9b2b2c1 MIPS: Move audit_arch() helper function to __syscall_get_arch().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:13 +01:00
Ralf Baechle
c0ff3c53d4 MIPS: Enable HAVE_ARCH_TRACEHOOK.
This enables /proc/<pid>/syscall and the ptrace PTRACE_GETREGSET and
PTRACE_SETREGSET operations.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:11 +01:00
Ralf Baechle
6a9c001b7e MIPS: Switch ELF core dumper to use regsets.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:09 +01:00
Ralf Baechle
7aeb753b53 MIPS: Implement task_user_regset_view.
There are no users yet of task_user_regset_view. yet; users will be
implemented rsp activated in subsequent commits.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:05 +01:00
Ralf Baechle
bc3d22c13e MIPS: ptrace: Use tracehook helpers.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:04 +01:00
Ralf Baechle
46e12c07b3 MIPS: O32 / 32-bit: Always copy 4 stack arguments.
This gets us rid of the hard to maintain table of the number of syscall
arguments and paves the way for further restructuring of the syscall
code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:02 +01:00
Ralf Baechle
19e2e172f0 MIPS: Provide arch_syscall_addr.
The generic version is wrong for MIPS.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:25:01 +01:00
Ralf Baechle
403342a82d MIPS: 32-bit: Remove unused gas macros fifty and mille.
These are a leftover of the IRIX compat code which was removed in
2957c9e61e (kernel.org) rsp.
b934da913f236bca00c41d9e386e980586000461 (lmo) [[MIPS] IRIX: Goodbye
and thanks for all the fish].

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:59 +01:00
Ralf Baechle
51d139b1e4 MIPS: Enable entries for SIGSYS in struct siginfo.
This is necessary because MIPS doesn't use HAVE_ARCH_SIGINFO_T for
historical reasons.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:57 +01:00
Ralf Baechle
03b94e2ec4 MIPS: 64-bit: Mark native syscall table as data object.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:55 +01:00
Ralf Baechle
43dec43069 MIPS: compat: Mark N32 syscall table as data object.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:54 +01:00
Ralf Baechle
2a9c275176 MIPS: compat: Export O32 syscall table and rename to avoid duplicate symbol.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:52 +01:00
Jayachandran C
f4ae17aa0f MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT
Allow usage of scratch register for current pgd even when
MIPS_PGD_C0_CONTEXT is not configured. MIPS_PGD_C0_CONTEXT is set
for 64r2 platforms to indicate availability of Xcontext for saving
cpuid, thus freeing Context to be used for saving PGD. This option
was also tied to using a scratch register for storing PGD.

This commit will allow usage of scratch register to store the current
pgd if one can be allocated for the platform, even when
MIPS_PGD_C0_CONTEXT is not set. The cpuid will be kept in the CP0
Context register in this case.

The code to store the current pgd for the TLB miss handler is now
generated in all cases. When scratch register is available, the PGD
is also stored in the scratch register.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: https://patchwork.linux-mips.org/patch/5906/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:51 +01:00
Maciej W. Rozycki
7f177a52a1 MIPS: Tell R4k SC and MC variations apart
There is no reliable way to tell R4000/R4400 SC and MC variations apart,
however simple heuristic should give good results.  Only the MC version
supports coherent caching so we can rely on such a mode having been set
for KSEG0 by the power-on firmware to reliably indicate an MC processor.
SC processors reportedly hang on coherent cached memory accesses and Linux
is linked to a cached load address so the firmware has to use the correct
caching mode to download the kernel image in a cached mode successfully.

OTOH if the firmware chooses to use either the non-coherent cached or the
uncached mode for KSEG0 on an MC processor, then the SC variant will be
reported, just as we currently do, so no regression here.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jonas Gorski <jogo@openwrt.org>
Cc: MIPS Mailing List <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/5882/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:48 +01:00
Maciej W. Rozycki
33afab80f0 MIPS: DECstation CPU feature overrides
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5877/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:46 +01:00
Maciej W. Rozycki
07217d75b7 DEC: Whitespace cleanup
Commit 7034228792 [MIPS: Whitespace
cleanup.] did a lot of good and a little damage.  Revert the damage.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5875/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:44 +01:00
Maciej W. Rozycki
0fabe1021f MIPS: DECstation I/O ASIC DMA interrupt classes
This change complements commits d0da7c002f7b2a93582187a9e3f73891a01d8ee4
[MIPS: DEC: Convert to new irq_chip functions] and
5359b938c0 [MIPS: DECstation I/O ASIC DMA
interrupt handling fix] and implements automatic handling of the two
classes of DMA interrupts the I/O ASIC implements, informational and
errors.

Informational DMA interrupts do not stop the transfer and use the
`handle_edge_irq' handler that clears the request right away so that
another request may be recorded while the previous is being handled.

DMA error interrupts stop the transfer and require a corrective action
before DMA can be reenabled.  Therefore they use the `handle_fasteoi_irq'
handler that only clears the request on the way out.  Because MIPS
processor interrupt inputs, one of which the I/O ASIC's interrupt
controller is cascaded to, are level-triggered it is recommended that
error DMA interrupt action handlers are registered with the IRQF_ONESHOT
flag set so that they are run with the interrupt line masked.

This change removes the export of clear_ioasic_dma_irq that now does not
have to be called by device drivers to clear interrupts explicitly
anymore.  Originally these interrupts were cleared in the .end handler of
the `irq_chip' structure, before it was removed.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5874/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:42 +01:00
Felix Fietkau
4e7f72660c MIPS: Remove unnecessary platform dma helper functions
The semantics stay the same - on Cavium Octeon the functions were dead
code (it overrides the MIPS DMA ops) - on other platforms they contained
no code at all.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5720/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:40 +01:00
Yoichi Yuasa
8a8594a738 MIPS: Cobalt: Move to 8250/16550 serial early printk driver
Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/948/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:38 +01:00
Yoichi Yuasa
7cd93b8935 MIPS: Add 8250/16550 serial early printk driver
Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/947/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:36 +01:00
Florian Fainelli
31c4867d6c MIPS: ZBOOT: Support LZ4 compression scheme
Add support for the LZ4 compression scheme in the ZBOOT decompression
stub, in order to support it we need to:

- select the "lz4" compression tool to compress the vmlinux.bin
  payload
- memcpy() is also required for decompress_unlz4.c so we share the
  implementation between GZIP, XZ and now LZ4

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: james.hogan@imgtec.com
Patchwork: https://patchwork.linux-mips.org/patch/5829/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:34 +01:00
Florian Fainelli
e970a72ec1 MIPS: ZBOOT: Define program header for text loadable segment
There is currently no corresponding ELF program header for the "text"
loadable segment which is confusing for some bootloader out there such
as CFE because it expects to find a program header matching the segment
it is trying to load. The Linux kernel ELF binary "vmlinux" has a
similar program header for the text segment so we just mimic this here
too.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: james.hogan@imgtec.com
Patchwork: https://patchwork.linux-mips.org/patch/5827/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:30 +01:00
Florian Fainelli
4e23eb631c MIPS: ZBOOT: Support XZ compression scheme
Add support for the XZ compression scheme in the ZBOOT decompression
stub, in order to support it we need to:

- select the "xzkern" compression tool to compress the vmlinux.bin
  payload
- link with ashldi3.o for xz_dec_run() to work
- memcpy() is also required for decompress_unxz.c so we share the
  implementation between GZIP and XZ

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: james.hogan@imgtec.com
Patchwork: https://patchwork.linux-mips.org/patch/5818/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:28 +01:00
Florian Fainelli
26fca83a22 MIPS: Kbuild: Do not allow building vmlinuz when !ZBOOT
When CONFIG_SYS_SUPPORTS_ZBOOT is not enabled, we will still try to
build the decompressor code in arch/mips/boot/compressed as a
dependency for producing the vmlinuz target and this will result in
the following build failure:

  OBJCOPY arch/mips/boot/compressed/vmlinux.bin
arch/mips/boot/compressed/decompress.c: In function 'decompress_kernel':
arch/mips/boot/compressed/decompress.c:105:2: error: implicit
declaration of function 'decompress'
make[1]: *** [arch/mips/boot/compressed/decompress.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [vmlinuz] Error 2

This is a genuine build failure because we have no implementation for
the decompress() function body since no kernel compression method
defined in CONFIG_KERNEL_(GZIP,BZIP2...) has been enabled.

arch/mips/Makefile already guards the install target for the "vmlinuz"
binary with a proper ifdef CONFIG_SYS_SUPPORTS_ZBOOT, we now also do the
same if we attempt to do a "make vmlinuz" and show that
CONFIG_SYS_SUPPORTS_ZBOOT is not enabled.

[ralf@linux-mips.org: Cleanup the makefile rule as suggested by James
Hogan.]

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: richard@nod.at
Patchwork: https://patchwork.linux-mips.org/patch/5817/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:26 +01:00
Greg Ungerer
f9a7febd82 MIPS: Fix start of free memory when using initrd
Currently when using an initrd on a MIPS system the start of the bootmem
region of memory is set to the larger of the end of the kernel bss region
(_end) or the end of the initrd. In a typical memory layout where the
initrd is at some address above the kernel image this means that the start
of the bootmem region will be the end of the initrd. But when we are done
processing/loading the initrd we have no way to reclaim the memory region
it occupied, and we lose a large chunk of now otherwise empty RAM from our
final running system.

The bootmem code is designed to allow this initrd to be reserved (and the
code in finalize_initrd() currently does this). When the initrd is finally
processed/loaded its reserved memory is freed.

Fix the setting of the start of the bootmem map to be the end of the kernel.

[ralf@linux-mips.org: fold in the fix of Ashok Kumar <ashoks@broadcom.com>.]

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1574/
Cc: Ashok Kumar <ashoks@broadcom.com>
Patchwork: https://patchwork.linux-mips.org/patch/5883/
Patchwork: https://patchwork.linux-mips.org/patch/6028/
Patchwork: https://patchwork.linux-mips.org/patch/6064/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:23 +01:00
Wu Zhangjin
007fbbea9f MIPS: Quiet the building output of vmlinux.32 and vmlinux.64
Based on quiet_cmd_X and cmd_X, this patch quiets the building output of
vmlinux.32 and vmlinux.64.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Sam Ravnborg <sam@ravnborg.org>
Patchwork: https://patchwork.linux-mips.org/patch/1766/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:21 +01:00
Ralf Baechle
f7777dcc75 MIPS: Panic messages should not end in \n.
Panic() is going to add a \n itself and it's annoying if a panic message rolls
of the screen on a device with no scrollback.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:19 +01:00
Ralf Baechle
761845f0f6 MIPS: Use NUMA_NO_NODE instead of -1 for node ID.
Original patch by Jianguo Wu <wujianguo@huawei.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:14 +01:00
Andrew Murray
cffe00c037 MIPS: of/pci: Use of_pci_range_parser
This patch converts the pci_load_of_ranges function to use the new common
of_pci_range_parser.

Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk>
Signed-off-by: Andrew Murray <Andrew.Murray@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: jason@lakedaemon.net
Patchwork: https://patchwork.linux-mips.org/patch/5625/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:11 +01:00
Hauke Mehrtens
8eae19ccae MIPS: BCM47XX: Fix detected clock on Asus WL520GC and WL520GU
The Asus WL520GC and WL520GU are based on the BCM5354 and clocked at
200MHz, but they do not have a clkfreq nvram variable set to the
correct value. This adds a workaround for these devices.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5843/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:09 +01:00
Hauke Mehrtens
2224de9d15 MIPS: BCM47XX: Fix clock detection for BCM5354 with 200MHz clock
Some BCM5354 SoCs are running at 200MHz, but it is not possible to read
the clock from a register like it is done on some other SoC in ssb and
bcma. These devices should have a clkfreq nvram configuration value set
to 200, read it and set the clock to the correct value.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5842/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:07 +01:00
Hauke Mehrtens
62cf3bc0b5 MIPS: BCM47XX: Get GPIO pin from nvram configuration
The nvram contains some gpio configuration for boards. It is stored in
a gpio<number>=name format e.g.
gpio8=wps_button
gpio4=robo_reset

This patches adds a function to parse these entries, so other driver
can use it.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5841/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:05 +01:00
Hauke Mehrtens
84e8bb5e92 MIPS: BCM47XX: Print board name in /proc/cpuinfo
Do not print the constant system type "Broadcom BCM47XX" but print the
name of the actual SoC in use and the detected board.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5839/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:02 +01:00
Hauke Mehrtens
786c497a69 MIPS: BCM47XX: Add board detection
Detect on which board this code is running based on some nvram
settings. This is needed to start board specific workarounds and
configure the leds and buttons which are on different gpios on every board.

This patches add some boards we have seen, but there are many more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5840
Patchwork: https://patchwork.linux-mips.org/patch/5855/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:24:00 +01:00
Markos Chandras
85f32dbdeb MIPS: Kconfig: CMP support needs to select SMP as well
The CMP code is only designed to work with SMP configurations.
Fixes multiple build problems on certain randconfigs:

In file included from arch/mips/kernel/smp-cmp.c:34:0:
arch/mips/include/asm/smp.h:28:0:
error: "raw_smp_processor_id" redefined [-Werror]

In file included from include/linux/sched.h:30:0,
from arch/mips/kernel/smp-cmp.c:22:
include/linux/smp.h:135:0: note: this is the location of the
previous definition

In file included from arch/mips/kernel/smp-cmp.c:34:0:
arch/mips/include/asm/smp.h:57:20:
error: redefinition of 'smp_send_reschedule'

In file included from include/linux/sched.h:30:0,
from arch/mips/kernel/smp-cmp.c:22:
include/linux/smp.h:179:20: note: previous
definition of 'smp_send_reschedule' was here

In file included from arch/mips/kernel/smp-cmp.c:34:0:
arch/mips/include/asm/smp.h: In function 'smp_send_reschedule':
arch/mips/include/asm/smp.h:61:8:
error: dereferencing pointer to incomplete type
[...]

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/5812/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:23:57 +01:00
Jayachandran C
c2377a42cd MIPS: Move definition of SMP processor id register to header file
The definition of the CP0 register used to save the smp processor
id is repicated in many files, move them all to thread_info.h.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5708/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:23:51 +01:00
Gabor Juhos
1a9db0a9ea MIPS: ath79: Remove ar933x_uart_platform.h header
In commit 15ef17f622
(tty: ar933x_uart: use the clk API to get the uart
clock), the AR933x UART driver for has been converted
to get the uart clock rate via the clock API and it
does not use the platform data anymore.

Remove the ar933x_uart_platform.h header file and get
rid of the superfluous variable and initialization code
in platform setup.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5832/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:23:49 +01:00
Julia Lawall
c6e7274e7a MIPS: ath79: simplify platform_get_resource_byname/devm_ioremap_resource
Remove unneeded error handling on the result of a call to
platform_get_resource_byname when the value is passed to devm_ioremap_resource.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression pdev,res,e,e1;
expression ret != 0;
identifier l;
@@

  res = platform_get_resource_byname(...);
- if (res == NULL) { ... \(goto l;\|return ret;\) }
  e = devm_ioremap_resource(e1, res);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Gabor Juhos <juhosg@openwrt.org>
Cc: kernel-janitors@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/5725/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:23:47 +01:00
Jiang Liu
dbee716974 MIPS: SMP: kill redundant call of generic_smp_call_function_single_interrupt()
Since commit 9a46ad6d6d "smp: make smp_call_function_many() use
logic similar to smp_call_function_single()",
generic_smp_call_function_single_interrupt() is an alias of
generic_smp_call_function_interrupt(), so kill the redundant call.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Shaohua Li <shli@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: Wang YanQing <udknight@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/5820/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:23:45 +01:00
Deng-Cheng Zhu
7f081f1755 MIPS: Perf: Fix 74K cache map
According to Software User's Manual, the event of last-level-cache
read/write misses is mapped to even counters. Odd counters of that
event number count miss cycles.

Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6036/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29 21:18:23 +01:00
Jingoo Han
331d7d6afe ARM: dts: use 'status' property for PCIe nodes
Set the default status for PCIe to disabled in the exynos5440.dtsi
file and let the board dts files such as exynos5440-ssdk5440.dts
enable the PCIe. However, keep the PCIe for SD5v1 board disabled,
because there is no PCIe slot on SD5v1 board.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-29 12:45:57 -07:00
Olof Johansson
b01928a41f Merge branch 'sirf/dt' into next/dt
From Barry Song:
Some missed dt nodes for sirf dts for 3.13. Among them:
 - add missed chhifbg node in prima2 and atlas6 dts
 - add missed cell, cs and dma channel for SPI nodes
 - add missed graphics2d iobg in atlas6 dts
 - add missed address-cells and size-cells for prima2 I2C
 - add missed memcontrol-monitor node in prima2 and atlas6 dts

* sirf/dt:
  ARM: dts: sirf: add missed address-cells and size-cells for prima2 I2C
  ARM: dts: sirf: add missed cell, cs and dma channel for SPI nodes
  ARM: dts: sirf: add missed graphics2d iobg in atlas6 dts
  ARM: dts: sirf: add missed chhifbg node in prima2 and atlas6 dts
  ARM: dts: sirf: add missed memcontrol-monitor node in prima2 and atlas6 dts

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-29 12:41:43 -07:00
Renwei Wu
7a54a4baf0 ARM: dts: sirf: add missed address-cells and size-cells for prima2 I2C
here prima2 i2c node is lacking of address-cells and size-cells.

Signed-off-by: Renwei Wu <Renwei.Wu@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-29 12:40:58 -07:00
Barry Song
6f4251158a ARM: dts: sirf: add missed cell, cs and dma channel for SPI nodes
here we need to add missed cell, cs and dma channels prop in SPI nodes
to match with drivers.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-29 12:40:58 -07:00
Jiansong Chen
304ec42fe9 ARM: dts: sirf: add missed graphics2d iobg in atlas6 dts
there is a bus bridge for graphics 2D module lost in current dts, this patch takes it
back.

Signed-off-by: Jiansong Chen <jiansong.chen@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-29 12:40:57 -07:00
Barry Song
0671840cce ARM: dts: sirf: add missed chhifbg node in prima2 and atlas6 dts
CPHIF(Cell phone interface) is behind sys bridge, this patch adds the
missed node.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-29 12:40:57 -07:00
Ye He
5fadea2286 ARM: dts: sirf: add missed memcontrol-monitor node in prima2 and atlas6 dts
memcontrol-monitor provides the ability of monitoring the memory bandwidth.

Signed-off-by: Ye He <ye.he@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-29 12:40:56 -07:00
Peter Zijlstra
e00b12e64b perf/x86: Further optimize copy_from_user_nmi()
Now that we can deal with nested NMI due to IRET re-enabling NMIs and
can deal with faults from NMI by making sure we preserve CR2 over NMIs
we can in fact simply access user-space memory from NMI context.

So rewrite copy_from_user_nmi() to use __copy_from_user_inatomic() and
rework the fault path to do the minimal required work before taking
the in_atomic() fault handler.

In particular avoid perf_sw_event() which would make perf recurse on
itself (it should be harmless as our recursion protections should be
able to deal with this -- but why tempt fate).

Also rename notify_page_fault() to kprobes_fault() as that is a much
better name; there is no notifier in it and its specific to kprobes.

Don measured that his worst case NMI path shrunk from ~300K cycles to
~150K cycles.

Cc: Stephane Eranian <eranian@google.com>
Cc: jmario@redhat.com
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: dave.hansen@linux.intel.com
Tested-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20131024105206.GM2490@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-10-29 12:02:54 +01:00
Peter Zijlstra
e8a923cc1f perf/x86: Fix NMI measurements
OK, so what I'm actually seeing on my WSM is that sched/clock.c is
'broken' for the purpose we're using it for.

What triggered it is that my WSM-EP is broken :-(

  [    0.001000] tsc: Fast TSC calibration using PIT
  [    0.002000] tsc: Detected 2533.715 MHz processor
  [    0.500180] TSC synchronization [CPU#0 -> CPU#6]:
  [    0.505197] Measured 3 cycles TSC warp between CPUs, turning off TSC clock.
  [    0.004000] tsc: Marking TSC unstable due to check_tsc_sync_source failed

For some reason it consistently detects TSC skew, even though NHM+
should have a single clock domain for 'reasonable' systems.

This marks sched_clock_stable=0, which means that we do fancy stuff to
try and get a 'sane' clock. Part of this fancy stuff relies on the tick,
clearly that's gone when NOHZ=y. So for idle cpus time gets stuck, until
it either wakes up or gets kicked by another cpu.

While this is perfectly fine for the scheduler -- it only cares about
actually running stuff, and when we're running stuff we're obviously not
idle. This does somewhat break down for perf which can trigger events
just fine on an otherwise idle cpu.

So I've got NMIs get get 'measured' as taking ~1ms, which actually
don't last nearly that long:

          <idle>-0     [013] d.h.   886.311970: rcu_nmi_enter <-do_nmi
  ...
          <idle>-0     [013] d.h.   886.311997: perf_sample_event_took: HERE!!! : 1040990

So ftrace (which uses sched_clock(), not the fancy bits) only sees
~27us, but we measure ~1ms !!

Now since all this measurement stuff lives in x86 code, we can actually
fix it.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@kernel.org
Cc: dave.hansen@linux.intel.com
Cc: eranian@google.com
Cc: Don Zickus <dzickus@redhat.com>
Cc: jmario@redhat.com
Cc: acme@infradead.org
Link: http://lkml.kernel.org/r/20131017133350.GG3364@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-10-29 12:01:20 +01:00
Ingo Molnar
aac898548d Merge branch 'perf/urgent' into perf/core
Conflicts:
	tools/perf/builtin-record.c
	tools/perf/builtin-top.c
	tools/perf/util/hist.h
2013-10-29 11:23:32 +01:00
Scott Wood
a3821b2af1 powerpc: Fix PPC_EMULATED_STATS build break with sync patch
Commit 9863c28a2a ("powerpc: Emulate sync
instruction variants") introduced a build breakage with
CONFIG_PPC_EMULATED_STATS enabled.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Kumar Gala <galak@kernel.org>
Cc: James Yang <James.Yang@freescale.com>
---
2013-10-28 22:08:55 -05:00
Christian Kujau
b60c5a7a82 powerpc/6xx: CONFIG_MCU_MPC8349EMITX cannot be a module
During "make ppc6xx_defconfig" the following happens:

  HOSTCC  scripts/basic/fixdep
  GEN     /usr/local/src/tmp/lnx/Makefile
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
arch/powerpc/configs/ppc6xx_defconfig:74:warning: symbol value 'm' invalid for MCU_MPC8349EMITX

Setting CONFIG_MCU_MPC8349EMITX=y in ppc6xx_defconfig makes the warning
go away. This too has been reported by Geert Uytterhoeven a long time ago:
https://lkml.org/lkml/2011/11/13/11  - I only came across this because I
needed a "clean" defconfig for this Powerbook G5.

Signed-off-by: Christian Kujau <lists@nerdbynature.de>
[scottwood@freescale.com: cleaned up commit message slightly]
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:24 -05:00
Wei Yongjun
dde8e3ee6b powerpc/mv643xx_eth: fix return check in mv64x60_eth_register_shared_pdev()
In case of error, the function platform_device_register_simple() returns
RR_PTR() and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:23 -05:00
Zhao Qiang
fd1348d098 powerpc/p1010rdb: add P1010RDB-PB platform support
The P1010RDB-PB is similar to P1010RDB(P1010RDB-PA).
So, P1010RDB-PB use the same platform file as P1010RDB.
Then Add support for P1010RDB-PB platform.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:23 -05:00
Wolfram Sang
d82341b08b arch/powerpc/platforms/83xx: Remove obsolete cleanup for clientdata
A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit or error. This is obsolete meanwhile, the core will do it.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:23 -05:00
Wei Yongjun
8d7c0b527f powerpc/6xx: add missing iounmap() on error in hlwd_pic_init()
Add the missing iounmap() before return from hlwd_pic_init()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:22 -05:00
LEROY Christophe
5f2da0f1e8 powerpc/8xx: Fixing memory init issue with CONFIG_PIN_TLB
Activating CONFIG_PIN_TLB allows access to the 24 first Mbytes of
memory at bootup instead of 8.  It is needed for "big" kernels for
instance when activating CONFIG_LOCKDEP_SUPPORT.  This needs to be
taken into account in init_32 too, otherwise memory allocation soon
fails after startup.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:22 -05:00
LEROY Christophe
4e591f3c0a powerpc/8xx: Fixing issue with CONFIG_PIN_TLB
Activating CONFIG_PIN_TLB is supposed to pin the IMMR and the first
three 8Mbytes pages.  But the setting of MD_CTR to a pinnable entry was
missing before the pinning of the third 8Mb page.  As the index is
decremented module 28 (MD_RSV4D is set) after every DTLB update, the
third 8Mbytes page was not pinned.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:21 -05:00
Kevin Hao
9e0967572e powerpc/85xx: use one kernel option for all the CoreNet_Generic boards
Currently all these boards use the same machine struct and also select
the same kernel options, so it seems a bit of redundant to keep one
separate kernel option for each board. Also update the defconfigs
according to this change.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:21 -05:00
Kevin Hao
befe7c123e powerpc/85xx: rename the corenet_ds.c to corenet_generic.c
This file is also used by some RDB and QDS boards. So the name seems
not so accurate. Rename it to corenet_generic.c. Also update the
function names in this file according to the change.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
2013-10-28 21:11:21 -05:00
Kevin Hao
512e267f35 powerpc/85xx: introduce corenet_generic machine
In the current kernel, the board files for p2041rdb, p3041ds, p4080ds,
p5020ds, p5040ds, t4240qds and b4qds are almost the same except the
machine name. So this introduces a cornet_generic machine to support
all these boards to avoid the code duplication.

With these changes the file corenet_ds.h becomes useless. Just delete
it.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:20 -05:00
Prabhakar Kushwaha
8f4a9e525a powerpc/dts/c293pcie: Add range field for IFC NAND
C290PCIe has NAND flash present on IFC Chip Select(CS) 1.

So Add "ranges" field for NAND flash on CS1.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:20 -05:00
York Sun
312325031d powerpc/b4860emu: Add device tree file for b4860emu
B4860EMU is a emualtor target with minimum peripherals. It is based on
B4860QDS and trimmed down most peripherals due to either not modeled or
lack of board level connections. The main purpose of this minimum dts is
to speed up booting on emulator.

Signed-off-by: York Sun <yorksun@freescale.com>
[scottwood@freescale.com: whitespace fix]
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:19 -05:00
York Sun
8f4af7df86 powerpc/t4240emu: Add device tree file for t4240emu
T4240EMU is an emulator target with minimum peripherals. It is based on
T4240QDS and trimmed down most peripherals due to either not modeled or
lack of board level connections. The main purpose of this minimum dts is
to speed up booting on emulator.

Signed-off-by: York Sun <yorksun@freescale.com>
[scottwood@freescale.com: whitespace fixes]
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:19 -05:00
Scott Wood
7371fcb7f7 powerpc/b4qds: enable coreint
Commit 9837b43c5f ("powerpc/85xx: enable
coreint for all the 64bit boards") removed the ifdef that avoided
coreint on 64-bit, but it missed b4_qds.c.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Kevin Hao <haokexin@gmail.com>
Cc: Shaveta Leekha <shaveta@freescale.com>
2013-10-28 21:11:19 -05:00
LEROY Christophe
79df1b374b powerpc/8xx: Revert commit e0908085fc
The commit e0908085fc ("powerpc/8xx: Fix
regression introduced by cache coherency rewrite") is not needed
anymore.  The issue was because dcbst wrongly sets the store bit when
causing a DTLB error, but this is now fixed by commit
0a2ab51ffb ("powerpc/8xx: Fixup DAR from
buggy dcbX instructions.") which handles the buggy dcbx instructions on
data page faults on the 8xx.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[scottwood@freescale.com: fix commit message]
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:18 -05:00
Hongtao Jia
afc4b47372 powerpc: Add I2C bus multiplexer node for B4 and T4240QDS
In both B4 and T4240QDS platform PCA9547 I2C bus multiplexer is used.
The sub-nodes are also reorganized according to right I2C topology.

Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:18 -05:00
Shengzhou Liu
788d399d3c powerpc/fsl/defconfig: enable CONFIG_AT803X_PHY
Enable CONFIG_AT803X_PHY to support AR8030/8033/8035 PHY.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:17 -05:00
Haijun.Zhang
3169ab00e0 powerpc/dts: Correct sdhci quirk for bsc9131
We use property "sdhci,auto-cmd12" instead of "fsl,sdhci-auto-cmd12"
to distinguish if the sdhc host has quirk SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12.

Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:17 -05:00
Haijun.Zhang
0f06ad7092 powerpc/eSDCH: Specify voltage for T4240QDS
Freescale T4240QDS reference board has extra voltage shifters added
to allow 3.3V operation, so add 3.3v voltage support for T4240QDS.
1.8v and 3.3v is recommand for eMMC and SDHC card.

Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:17 -05:00
LEROY Christophe
1eb2819d69 powerpc/mpc8xx: Clearer Oops message for Software Emulation Exception
This patch modifies the Oops message in case of Software Emulation Exception.
The existing message is quite confusing because it refers to FPU Emulation
while most often the issue is due to either a non supported instruction
(not necessarily FPU related) or a stale instruction due to HW issues.
The new message tries to be more generic in order to make the user understand
that the Oops is due to something wrong with an instruction, not necessarily
due to an FPU instruction.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:16 -05:00
Suzuki Poulose
a0b38b4e78 powerpc: Set the NOTE type for SPE regset
The regset defintion for SPE doesn't have the core_note_type
set, which prevents it from being dumped. Add the note type
NT_PPC_SPE for SPE regset.

Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com>
Cc: Roland McGrath <roland@hack.frob.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:16 -05:00
Lijun Pan
f4b123886d powerpc/e500v2: Include Power ISA properties
bsc9131 device tree does not have these properties.

Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:16 -05:00
Lijun Pan
4f6d45d7db powerpc/e6500: Include Power ISA properties
b4420 and b4860 device trees do not have these properties.

Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:15 -05:00
Chunhe Lan
bbd234b146 powerpc/pci: Change the DECLARE_PCI_FIXUP_{HEADER => EARLY} macro of pci quirk
Freescale platform has class code = 0x0b2000, when it boots. This makes
kernel PCI bus code to setup these devices resulting into the following
notice information when trying to enable them:

pci 0000:00:00.0: ignoring class 0x0b2000 (doesn't match header type 01)

The above information is outputted by judging value of dev->class before
pci_setup_device() function, and the DECLARE_PCI_FIXUP_HEADER quirk runs
after pci_setup_device() function. But the DECLARE_PCI_FIXUP_EARLY quirk
runs before judging value of dev->class and pci_setup_device() function.
So we use the DECLARE_PCI_FIXUP_EARLY macro to fix this issue.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:15 -05:00
Minghuan Lian
0e3d4373b8 powerpc/dts: fix sRIO error interrupt for b4860
For B4 platform, MPIC EISR register is in reversed bitmap order,
instead of "Error interrupt source 0-31. Bit 0 represents SRC0."
the correct ordering is "Error interrupt source 0-31. Bit 0
represents SRC31." This patch is to fix sRIO EISR bit value
of error interrupt in dts node.

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2013-10-28 21:11:14 -05:00
Linus Torvalds
c9ca72fc56 Xtensa patchset for v3.12-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSXuCxAAoJEI9vqH3mFV2sdWwP/11xVQFtzoT01k9P4fZeFCMT
 +dGztMBY6bODMEyeC9raX6sJhuOYNivS2IBFJ4qv9p+kcCplYE0EsB3MfOQ60NdV
 eV2DdnHrPKgIPUutGf7mcZ5bXB8q8HEuEFn0ONsCdNTAxzrcLxaPZU3MeGhSfL0H
 d/RPPmSW8+vLEMWUe58EB2J8Z1DJye4O0pbxskjGA64KrLssKBG3LWBQBdTsihkE
 r2olYYT0j7osJ7loLbyll/CcacQTfJbQT8Xd0Y7MbLYR/G6EVMwb6PkzkFnUPMIQ
 zLwMAOgL8/E250p4ab0Wy8vf9rW+938qR93oZEyO8TRDdF/mYNQb+GK+ZKUrMrxg
 eZ/pOhKQ+xUKtt23xrvbXR3nTnI9AfiJ1nhuO4UmX5WIhyJXDcYYk+rujlEduxGm
 IJ7p5cRWBdqC+iIiSzQJjyW4drIXU6QJ+ureOGo0vBcBJsLRbUFYLt+08Rb60/d1
 zgS8L7DpKRUZlIrbD6/HxyUimJCTGERsvTSDZYCYs1+ri/YKV4a8Ukfsl8bWLbhd
 Le5PyMeusWaM6MHCIOJPys2SpsKGl9UCaVr7Nz1Lr6HIqZJUN61rNVSIcUpufiqt
 hPSYtljmz6746Z6QvNW0OD8+qE5foplCnv94Oqj9tb24gHfINPXkjiaEKhPDICi0
 6cCQj4pCsjjlzXXmn5Fp
 =sopZ
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-next-20131015' of git://github.com/czankel/xtensa-linux

Pull Xtensa patchset from Chris Zankel:
 "The main patch fixes a bug that can cause a kernel panic, and was
  introduced in rc1.  The other two have been discovered by a uclibc
  test and 'coccinelle'"

* tag 'xtensa-next-20131015' of git://github.com/czankel/xtensa-linux:
  xtensa: Cocci spatch "noderef"
  xtensa: don't use alternate signal stack on threads
  xtensa: fix fast_syscall_spill_registers_fixup
2013-10-28 16:58:05 -07:00
Grant Likely
0976c946a6 arm/versatile: Fix versatile irq specifications.
Two of the versatile irq definitions are incorrect, mostly because two
devices have connections to more than one interrupt controller. Fix them
by using the new interrupts-extended property to fan out without using
an awful interrupt-map nexus node.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
2013-10-28 16:50:11 -07:00
Grant Likely
79d9701559 of/irq: create interrupts-extended property
The standard interrupts property in device tree can only handle
interrupts coming from a single interrupt parent. If a device is wired
to multiple interrupt controllers, then it needs to be attached to a
node with an interrupt-map property to demux the interrupt specifiers
which is confusing. It would be a lot easier if there was a form of the
interrupts property that allows for a separate interrupt phandle for
each interrupt specifier.

This patch does exactly that by creating a new interrupts-extended
property which reuses the phandle+arguments pattern used by GPIOs and
other core bindings.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Kumar Gala <galak@codeaurora.org>
[grant.likely: removed versatile platform hunks into separate patch]
Cc: Rob Herring <rob.herring@calxeda.com>
2013-10-28 16:48:14 -07:00
Linus Walleij
f3372c0181 ARM: gemini: convert to GENERIC_CLOCKEVENTS
This converts the gemini machine to use generic clockevents
by rewriting the timer driver.

Cc: arm@kernel.org
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 15:06:15 -07:00
Olof Johansson
5f55c317e4 Some more dts changes via Benoit Cousson <bcousson@baylibre.com>:
Add a lot of N900 nodes
 Add OPP table to OMAP5/DRA7
 Add support for Newflow NanoBone board
 Add i2c aliases
 Add McASP and audio support
 Add reset/idle on init bindings for OMAP
 Add more nodes for AM4272
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSZ6KqAAoJEBvUPslcq6VzXQ8P/2FfipJA3iJkI69sqghLDFqt
 Gx9cen4CzEsMv/9sLYQxkxw01xYUivHLFAQGL593aJTobbaSeyYCcfvJPB8Y9Jel
 jwoDxF3KbhnqT6PpJild+uJYeWg5UsiZcbreGgpxXj15KYSiwCUY97ga6iCQrUYt
 pqzC39DP1eViynaRYSIZjxOKKxpfUS5XWAMCsEsMr8UU9p15BsgZTbg2hwgVX3PG
 +e9/Mpfp7T1Tf6c85mCfCKjvVr4zvdJTgqphYfQFySzyPIww0FoHLjGoCZB8PjxG
 WSVw+i+yMCIZcAq90JIzgJ2PyD65ZKMRv9/5vxAh2UHXu7xxO8gLG3KWonN5ogMT
 xTiw+dPTZC8h12i2uFYxutLhV7nLVe3PKbjWMsdV7qXPVpZw9L8DmcHmIyzakKb6
 jkHk6vQfR2pFw8B93TzptziQULS8TIVc3aKwalELm+4LtMkhAJIrv81BTMAb/zC6
 moskG5/YbVEh6NR7x53aIXWfm2uUfLo/rRWp8kwmRQWDKe8bjZg+HGzp5/aKdqrh
 /ane2I0g5qVqB3Ivn7bNTWl4rN+NlTYFKZQ653fbFPbtVeTUh6gvAo5LYdwuJzvc
 DmhG176wbmkhBH2IoJKqwr9JsMTuuFKH1adT9WKi2PWvseX8Z0iwf+1dpm0l8sNl
 xlxoKEHneJjVEtEq8T5K
 =8KX8
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.13/dt-late' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt

Some more dts changes from Benoit Cousson <bcousson@baylibre.com> via
Tony Lindgren:

- Add a lot of N900 nodes
- Add OPP table to OMAP5/DRA7
- Add support for Newflow NanoBone board
- Add i2c aliases
- Add McASP and audio support
- Add reset/idle on init bindings for OMAP
- Add more nodes for AM4272

* tag 'omap-for-v3.13/dt-late' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (42 commits)
  ARM: dts: omap5-uevm: Remove pinmux for dmic pins
  ARM: dts: omap5-uevm: Correct twl6040 reset GPIO pinmux
  ARM: dts: TWL4030: Add power button support
  ARM: dts: omap3-n900: Add LP5523 support
  ARM: dts: omap3-n900: Add TLV320AIC3X support
  ARM: dts: omap3-n900:: Mux RX51_LCD_RESET_GPIO in DTS
  ARM: dts: omap3-n900: Add NAND support
  ARM: dts: omap3-n900: Specify regulator info
  ARM: dts: TWL4030: Add missing regulators
  ARM: dts: omap3-n900: Add LP5523 support
  ARM: dts: omap3-n900: Add vibrator device
  ARM: dts: omap3-n900: GPIO key definitions
  ARM: dts: omap3-n900: Add support for SD cards
  ARM: dts: omap3-n900: Add UART support
  ARM: dts: omap3-n900: Fix i2c bus speed
  ARM: dts: omap3-n900: Add pinctrl for i2c devices
  ARM: dts: DRA7: Add CPU OPP table
  ARM: dts: OMAP5: Add CPU OPP table
  ARM: dts: dra7-evm: add smps123 supply for CPU
  ARM: dts: omap5-uevm: add smps123 supply for CPU
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 14:47:50 -07:00
Olof Johansson
137f66ee14 Few patches to make cpufreq work for omap3 with device tree.
Note that this branch has a dependency to the patches merged
 with omap-for-v3.13/board-removal-signed-take2.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSZ49CAAoJEBvUPslcq6VzUC4QANbR4y0WR51tLU5Z5e4WZMCn
 VYn5GjmiBSBWcpMuSlboOY08+8uuK6YBf7FugqUgxSXgvlxZO587+oo6/v1mVEE/
 9Xcg7JGvmOPljmp5Zvl1IEo6OJ3UqlDm7earQLYIWxNO3CAtUUTEpOKC2zOpqbX/
 yOFdE9METAmtrOO1wk82F86PjHfOwfd+TPpKKV9ZzGRQwHMmFzmJoUnkCsGwPqww
 Wq8lPyumDytltr+nIEjKWq5eqlZML//PhJxL+vtqDc41kRQR2vGhLd9uHmnnOA+U
 /igzIakrGdhxoki0bUq89cP5cVzRLqH6uNFKVilNC3LGu+D6OOyAlteCaiqzsEoJ
 hBDGzccEOXJ4eWtyW9hbKpvVtoQwAjNmpZoZWn6co3myiBPLSH4WrJHAy+ELGiyE
 T6eA2b3h1wKe/zMyAs+bp+q2pm7If67PeeFaTmkP1TLwI4onad9z8rD5ePi65FbQ
 HcUhZ8IwFhcboBv77XQ9IVLnpTwBxqq869zs6l5KCEw103Oz/ighrXa9jrPe+4Nj
 vkqXTk0hoL0Uf5dt7xDjNA6DKWEp0VxQKq/38wkRFtyjIpOVdBMKldNk+AIEmh7T
 G+HT90AclvaZIrmFZ4BpWEVD9Iwjg51x/URxSP+NacQCNmr+pvYA18mYdT1ltbKc
 PKjApNszvKsIfn8lNnt2
 =E/nA
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.13/cpufreq-late' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt

From Tony Lindgren:
Few patches to make cpufreq work for omap3 with device tree.

Note that this branch has a dependency to the patches merged
with omap-for-v3.13/board-removal-signed-take2.

* tag 'omap-for-v3.13/cpufreq-late' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP3+: use cpu0-cpufreq driver in device tree supported boot
  ARM: OMAP2+: add missing lateinit hook for calling pm late init
  ARM: OMAP3+: do not register non-dt OPP tables for device tree boot

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 14:43:09 -07:00
Olof Johansson
43d93947a5 Via Paul Walmsley <paul@pwsan.com>:
Move some of the OMAP2+ CM and System Control Module direct
 register accesses into CM- and System Control
 Module-specific "drivers" underneath arch/arm/mach-omap2/.  This
 is a prerequisite for moving this code out of arch/arm/mach-omap2/ into
 drivers/.
 
 Basic test logs are available here:
 
 http://www.pwsan.com/omap/testlogs/cm_scm_cleanup_a_v3.13/20131019101809/
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSZAZXAAoJEBvUPslcq6VzCWQQAKH4Rj0izwbbLkgBAeeaQz5K
 oJgPJ6UPLOJ2uLIUauCKUSR6+nktrCTfV8P+J4DhCc6OiGrKBXJhSETPgaTbWsNw
 Bd577pmuvXSfNFXUaLwCgkSmafJ1pi6d7kEx/7ZW3TziVE/aUxyeHkrMtWJHrjTP
 28tJVieOxLlO5iK06DfmGcCpLUBKJKtgGRo0h/oqMhLAaN5S8//lyVYgdsto7oCN
 /bes6OpuVVdKiSr78V4rCVtR5Lij5+lVrT8HDiw2BA0V3bYcI7+CVlWBPZ3mYkuy
 oAJDcn9whNyfWS+SsaTIjy6nHsgQkhEJnhrQW3k2skVZobRtWDv7U5LiTjsUhb3o
 pjyWD8zZ7jqrkgyLsai6dm1zsljMQXsIQwH5h++HdCRhtNOXd6bVQZy0KqkpLu0y
 Bhpt8/edh4Bdc305oB05/Y9Uxr7Gr8M377chVZx+JD3rxIDjRRyOJcRIhd27WZEf
 HSMLpO/ayUXWdDuTlKW0IEnImx3PrxT913cnjIY589FhfdahfGQoft4sWDeiQLAX
 +zVYZljeY+GxbUWO6aY4m2PfVN9p/Hwal58NZZgj59wq9iHUuJErK11X7rj+2vwN
 +20IS8sikz6Iym84iC0T+omUeFVY0Zo004DVvpPB+D1C2LpwdI1c6kTz4DYT1EBP
 pvs8Wihkk7xQxQn0rBGP
 =L37r
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.13/cm-scm-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

From Paul Walmsley <paul@pwsan.com> via Tony Lindgren:

Move some of the OMAP2+ CM and System Control Module direct
register accesses into CM- and System Control
Module-specific "drivers" underneath arch/arm/mach-omap2/.  This
is a prerequisite for moving this code out of arch/arm/mach-omap2/ into
drivers/.

Basic test logs are available here:

http://www.pwsan.com/omap/testlogs/cm_scm_cleanup_a_v3.13/20131019101809/

* tag 'omap-for-v3.13/cm-scm-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP3: control: add API for setting IVA bootmode
  ARM: OMAP3: CM/control: move CM scratchpad save to CM driver
  ARM: OMAP3: McBSP: do not access CM register directly
  ARM: OMAP3: clock: add API to enable/disable autoidle for a single clock
  ARM: OMAP2: CM/PM: remove direct register accesses outside CM code
  + Linux 3.12-rc4

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 14:39:03 -07:00
Olof Johansson
462fb38f3d Few more omap fixes that are not regressions or oopses and can
wait for the merge window.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSZ5QdAAoJEBvUPslcq6VzYjwQAKvzhTaA8yI3fKr7HYSGAfao
 lxHPaLMJORTCizyH/EUDSS0k2yDH8otIhyx1quQuC51Vk64vXxE1XXdsaPCy1t8B
 e+bWwAh51NgKJbSKDw+ZkNzSxePNmo+dRRCb6o5NQOgXuDqEwuyhZLaIS+7xVinw
 DSoKjU79bWexCZUEgHYAw/zi0KHRjro/FLrsiazcZt5zucijBjhBpvlyXik9Knpr
 nOZPUqeJd8ZXgEMqwPNiQDxYhIJNQVoHhF+upExU4bKOBMfTJDEqdoO344C6YyPn
 uzpYiHSSMdCfFi5Ahz1ZA/yYRo/9RqGdTFPIe0kL5Hk8vRxk5HZLUOeH+BFORudg
 ZvDURckFCDS7rwKvS4KVu28lr1sK36qDugdxYr1XN4RTNW6pmnf3GSuaHvd9BpaU
 UpMwENhR0JH5bG4McVTwKln6ogaqE0rbd+33QnPrsO3w+268sVbeiYhg5Dc3A5HO
 p2qKBWVlJevxLbUBnvFHpyrIn47LxFypl6pdlT+nh1UMjvW/zw1KGQcMONxGPUg9
 mZu9WG/qqgS/n+bekm0WB6e4bpkvRg9JzxFNQTJlvS3tCI+JG20eNN3u3JljOGER
 ngqPRQQ0e4FOZfZ1h/ejfrUjxOye+GzeeVgdtfOyUlrgGeLSHfWyZQo5vfER0EoV
 SIkm+t9gSHupqrlV5Q6X
 =WhmE
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.13/fixes-not-urgent-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes-non-critical

From Tony Lindgren:
Few more omap fixes that are not regressions or oopses and can
wait for the merge window.

* tag 'omap-for-v3.13/fixes-not-urgent-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: irq, AM33XX add missing register check
  ARM: OMAP2+: wakeupgen: AM43x adaptation

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 13:58:12 -07:00
Olof Johansson
7a54698fa6 mvebu dt changes for v3.13 (round 4)
- mvebu
     - core divider clock driver dt binding and nodes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQEcBAABAgAGBQJSZ7F/AAoJEAi3KVZQDZAeRRYH/Rf1VU4cIhskVyl2RH+ns54B
 XKQRUzdFmgUox4SZfGE4gPURbVUlAdv9ZAn89TaOmaVC9C/Xw4c6a2xaVXy3ns19
 Nd7SvxZ1iw15VWvtjXQzwgScTWUmltYRHwA9ebH8cKRCZL0LhL9ZSxQNjjcVEO7p
 GdOmeqJIsGc2Lseztqhmgknx1VpfjWgLPSeBkGK13xAg68uo15kQfyLh8ZcbUHd2
 1O7SnkTKpYkhWrwWRw/BYlagiR5WvvdHKNuvr5sMXyCC4h1NABCFkrIv8jmSscYj
 aY4XuheaSzIb7FPzm/4k4OC5KaU3mi+ngpQBJO4Lwh109eUdh52Y9xpwB6+SpvI=
 =eiSc
 -----END PGP SIGNATURE-----

Merge tag 'dt-3.13-4' of git://git.infradead.org/linux-mvebu into next/dt

From Jason Cooper, mvebu dt changes for v3.13 (round 4):

 - mvebu
    - core divider clock driver dt binding and nodes

* tag 'dt-3.13-4' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: Add the core-divider clock to Armada 370/XP
  ARM: mvebu: Add a 2 GHz fixed-clock Armada 370/XP
  ARM: mvebu: Add Core Divider clock device-tree binding
2013-10-28 13:42:02 -07:00
Pawel Moll
81d6e719d1 ARM: vexpress: Enable platform-specific options in defconfig
This patch enables all drivers and alike to make defconfig-ed
kernels use Versatile Express specific features, like power
management services (PSCI, MCPM with drivers for DCCSB on
Fast Models and SPC on TC2), CMA for frame buffer allocation,
all virtio device drivers (for QEMU, KVM tools and Fast Models),
MTD physmap drivers with squashfs and UBIFS for flash,
I2C master, regulator and hwmon drivers and LEDs support with
most useful triggers. The maximum amount of CPUs has been
increased to 8 to facilitate big.Little systems.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 13:26:02 -07:00
Fathi Boudra
0ffae27f0f ARM: vexpress: Make defconfig work again
This patch updates the Versatile Express defconfig to a level
which makes it possible to run a defconfig-ed kernel work
on the board and in QEMU with modern userspace. It does:

- update cmdline to contain "console=ttyAMA0" only
- enable devtmpfs filesystem
- enable voltage regulator support
- enable ext4 filesystem
- disable low level debug and early printk

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
[PM: removed DEBUG_LL - it doesn't work on qemu]
[PM: reworded the commit message]
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 13:25:54 -07:00
Olof Johansson
0f56438038 The imx/mxs device tree changes for 3.13:
* Use macros for mxs pinctrl settings
 * New board support: VF610 Cosmic/Cosmic+, imx6q-udoo, MSR M28CU3
 * Support DSPI device for vf610
 * Add PCIe device for imx6qdl
 * Add UHS pinctrl states for imx6sl and imx6qdl
 * Display support for APF and imx51-babbage boards
 * Enable SPI NOR and USB for imx6sl-evk board
 * Enable LVDS for imx6q-sabrelite and SPDIF for imx6qdl-wandboard
 * Misc updates on boards: TX28, imx6qdl-wandboard, imx53-qsb etc.
 * Some random updates on imx51 device tree
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJSZJgGAAoJEFBXWFqHsHzOskMIALiVd2Cs/Kl4LBufL5JM7JIz
 Kh8mW24QmuwoMV0KHGEbzVlZbrIXyQj/8P89AnxaWTBhx9BKTBI1hWPrhCoXEGVQ
 mxwpPce9WGiabwR0za9BEYnMOWo4E3s3XAb8rVm5I8d95oe42kCK+yJrhnG+2oQE
 Z6+HRfmVTFcXtETcMwggOjgYdV+CRtXiMgoDFiQ10WSrv/9FI9bbS7fEirqEDzaR
 4ZkAKNIjbeMYPi0VBbM7bjXezuPUswENyJQQurbCi/h51vpL/oPxEIJKJI3g8Kpi
 KLcQu4VAWdzSrrKMdQpVqIcofJLLG5+LJGd7ay8zBGoGgyTtyrAEtwYIjzj/LGE=
 =Ya6+
 -----END PGP SIGNATURE-----

Merge tag 'imx-dt-3.13' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/dt

From Shawn Guo:
The imx/mxs device tree changes for 3.13:

- Use macros for mxs pinctrl settings
- New board support: VF610 Cosmic/Cosmic+, imx6q-udoo, MSR M28CU3
- Support DSPI device for vf610
- Add PCIe device for imx6qdl
- Add UHS pinctrl states for imx6sl and imx6qdl
- Display support for APF and imx51-babbage boards
- Enable SPI NOR and USB for imx6sl-evk board
- Enable LVDS for imx6q-sabrelite and SPDIF for imx6qdl-wandboard
- Misc updates on boards: TX28, imx6qdl-wandboard, imx53-qsb etc.
- Some random updates on imx51 device tree

* tag 'imx-dt-3.13' of git://git.linaro.org/people/shawnguo/linux-2.6: (44 commits)
  ARM: imx: imx6sl iomuxc syscon is compatible to imx6q
  ARM: dts: imx6sl-evk: enable the SPI NOR
  ARM: dts: imx6sl: add a pinctrl for ECSPI1
  ARM: imx27: add missing #pwm-cells property
  ARM: dts: imx6sl: add pinctrl uhs states for usdhc
  ARM: dts: imx6qdl-sabresd: Add backlight support for lvds
  ARM: dts: imx51-babbage: Make DVI and WVGA panel functional
  ARM: imx27-apf27dev: Add framebuffer support
  ARM: imx51-apf51dev: Add parallel display support
  ARM: dts: imx53-qsb: Do not use GPIO1_8 as wakeup source
  ARM: dts: imx53-qsb: SDHC1 does not have cd-gpios
  ARM: dts: imx53-qsb: SDHC3 is connected in 8-bit mode
  ARM: dts: mxs: Add MSR M28CU3 board
  ARM: dts: imx6qdl-wandboard: Provide phy-reset-gpios
  ARM: dts: imx6qdl-sabresd: Provide phy-reset-gpios
  ARM: dts: imx6q-sabrelite: Add ethernet phy reset pin into hog
  ARM: dts: imx6qdl: add pcie device node
  ARM: dts: imx6q-udoo: Add initial board support
  ARM: dts: mxs: Add muxing options for the SSP2 MMC
  ARM: dts: add initial VF610 Cosmic/Cosmic+ board support
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 13:21:42 -07:00
Matt Fleming
72548e836b x86/efi: Add EFI framebuffer earlyprintk support
It's incredibly difficult to diagnose early EFI boot issues without
special hardware because earlyprintk=vga doesn't work on EFI systems.

Add support for writing to the EFI framebuffer, via earlyprintk=efi,
which will actually give users a chance of providing debug output.

Cc: H. Peter Anvin <hpa@zytor.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Jones <pjones@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-10-28 18:09:58 +00:00
Olof Johansson
b6fb5474af The imx/mxs soc changes for 3.13:
* Low-level debug support for Vybrid
 * Support soc bus/device for imx6
 * Suspend support for imx6dl and imx6sl
 * The imx6q clock updates for PCIe and audio PLL support
 * IOMUXC GPR update for fec support
 * Some random cleanup
 * A few defconfig updates
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJSZI9RAAoJEFBXWFqHsHzOhgkH/RpZ6cvXFFaRdTWQu/SZCXTN
 m3Ul0VpuaUp9gsbDNbu//OmqCAsayXaKI7PuJhs885zDKw6R3yMH7hbwXY7z0Qrq
 jl9hP1Wzj7oU4CHTQbSDdcO3glUk+jl58a2MrsMsUaXPJTF8iMb8RkatwnReYhiZ
 uCBXPwaet7SJTuVQOL1uJmq35LmiROwyAkGsDKnDmphg3ZDUiI9mhqlyOyrS522w
 TjmCXrzZQiHkTp12Xo42fIEvE6BF5wCLDlJbq9HRDAlT82CnV62uQC/9os45Hott
 H1pJbwdbcdv3+6gUdnWbraukrbhCxT8Yk0As4ljP6YBCxC7Sau+oMh3ii4pvuI0=
 =VUrE
 -----END PGP SIGNATURE-----

Merge tag 'imx-soc-3.13' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/soc

From Shawn Guo:
The imx/mxs soc changes for 3.13:

* Low-level debug support for Vybrid
* Support soc bus/device for imx6
* Suspend support for imx6dl and imx6sl
* The imx6q clock updates for PCIe and audio PLL support
* IOMUXC GPR update for fec support
* Some random cleanup
* A few defconfig updates

* tag 'imx-soc-3.13' of git://git.linaro.org/people/shawnguo/linux-2.6: (31 commits)
  ARM: imx: enable suspend for imx6sl
  ARM: imx: ensure dsm_request signal is not asserted when setting LPM
  ARM: imx6q: call WB and RBC configuration from imx6q_pm_enter()
  ARM: imx6q: move low-power code out of clock driver
  ARM: imx: drop extern with function prototypes in common.h
  ARM: imx: reset core along with enable/disable operation
  ARM: imx: do not return from imx_cpu_die() call
  ARM: imx_v6_v7_defconfig: Select CONFIG_PROVE_LOCKING
  ARM: imx_v6_v7_defconfig: Enable LEDS_GPIO related options
  ARM: mxs_defconfig: Turn off CONFIG_DEBUG_GPIO
  ARM: imx: replace imx6q_restart() with mxc_restart()
  ARM: mach-imx: mm-imx5: Retrieve iomuxc base address from dt
  ARM: mach-imx: mm-imx5: Retrieve tzic base address from dt
  ARM: mach-imx: clk-imx51-imx53: Retrieve base address and irq from dt
  ARM: mxs_defconfig: Add CHIPIDEA_UDC support
  ARM: imx: Include linux/err.h
  ARM: imx_v6_v7_defconfig: Add CHIPIDEA_UDC support
  ARM: imx_v6_v7_defconfig: Add SPDIF support
  ARM: imx6q: clock and Kconfig update for PCIe support
  ARM: imx: Add LVDS general-purpose clocks to i.MX6Q
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 10:37:52 -07:00
Olof Johansson
826f57b497 Merge tag 'sunxi-defconfig-for-3.13' of https://github.com/mripard/linux into next/soc
From Maxime Ripard:
Allwinner sunXi defconfig changes for 3.13

This pull request only see the introduction of a sunxi_defconfig.

* tag 'sunxi-defconfig-for-3.13' of https://github.com/mripard/linux:
  ARM: sunxi: Add a defconfig for the Allwinner SoCs

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 10:19:46 -07:00
Olof Johansson
0d74578b7d ARM: sunxi: remove .init_time hooks
The machine entries were split up, but the cleanup to remove .init_time
removed the function that the new/split entries refer to. Remove them
since they are no longer needed.

Cc: Maxime Ripard <mripard@free-electrons.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 10:19:45 -07:00
Olof Johansson
e086df92e2 Allwinner sunXi SoCs machine additions for 3.13
Nothing outstanding here, mostly some documentation cleanup, and the split of
 the previous generic machine declaration into three different machines to
 handle the sun4i/sun5i, sun6i and sun7i separately.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSYWutAAoJEBx+YmzsjxAgrscQAI8HcLtqaCDRktPOdZwtxl2x
 BWb91mVzOeZsIpbzqZFy6ffZR728+a3Hz5WJkNX7gFwwwh//1YW1pU2icw44Ch5g
 2TfECqjZqfGv3cgpHGn4i7qxXWX+M/fxrFNSEjyRfKNFo6lZS9uNYJI9n7CEelbt
 XQIQ489Oxa9jU0ZGztH4F9S+sj0RVm4IHK32SZLq9UA7+GcC5RvQZ4sDup3gikKH
 lj1OqmCWX+A8KH2u5r7wwWNVjxvXrCuTHIMwL0jGsx1iz27nAsDe+blKMcYgEzPX
 6SluNoTwe5c8U4SU/zwdHpWJCIFPSEaT/PjZ0wIGgSpCg3/6sndtsceeB5uG8szQ
 IBWOfvlsj1Xegz6LsY/IgEqzLn5GnEhuSFGEOoaJP31ZOkd0fWekV87ES4Jicz3+
 wpTukRahrzCj57n1Rnpik+M5Nbb/Ef8b3rrgSat6eUwO1OpZJvF6XOk7l1ByQ1AO
 O3IqdofR8XjwMFzZn0zWyzdUujXwM6MI0PkRJSRNX59AtqrIQHuV6de+JJH6knub
 PLe4ZLpQonqP3BH42mcBjS4JcNub8MfpBl6c3w4AJ3uuH3I0dhGN4LP39O4r2d5H
 0VWFhZlbhRHURyo0dCaeZu5utzK/yUPx/6J8eUD6rsJs1WsAPggDYU66IB3ecGr/
 sS47wxl9t0Yuy9/+X2n6
 =2aio
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-core-for-3.13' of https://github.com/mripard/linux into next/soc

From Maxime Ripard:
Allwinner sunXi SoCs machine additions for 3.13

Nothing outstanding here, mostly some documentation cleanup, and the split of
the previous generic machine declaration into three different machines to
handle the sun4i/sun5i, sun6i and sun7i separately.

* tag 'sunxi-core-for-3.13' of https://github.com/mripard/linux:
  Documentation: dt: Remove clock gates IDs list for Allwinner SoCs
  Documentation: dt: Remove interrupt sources list for Allwinner SoCs
  Documentation: sunxi: Update Allwinner SoC documentation
  Documentation: sunxi: Update A13 user manual dead link
  ARM: sunxi: Order Kconfig options alphabetically
  ARM: sunxi: Simplify restart setup code
  ARM: sunxi: Split out the DT machines for sun6i and sun7i

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 10:19:38 -07:00
Olof Johansson
0fc869e8f2 Merge branch 'cleanup/dt-clock' into next/soc
Merging in dt clock cleanup as a pre-req with some of the later SoC branches.

There are a handful of conflicts here -- some of the already merged SoC
branches should have been based on the cleanup but weren't.

In particular, a remove/add of include on highbank and two remove/remove
conflicts on kirkwood were fixed up.

* cleanup/dt-clock: (28 commits)
  ARM: vt8500: remove custom .init_time hook
  ARM: vexpress: remove custom .init_time hook
  ARM: tegra: remove custom .init_time hook
  ARM: sunxi: remove custom .init_time hook
  ARM: sti: remove custom .init_time hook
  ARM: socfpga: remove custom .init_time hook
  ARM: rockchip: remove custom .init_time hook
  ARM: prima2: remove custom .init_time hook
  ARM: nspire: remove custom .init_time hook
  ARM: nomadik: remove custom .init_time hook
  ARM: mxs: remove custom .init_time hook
  ARM: kirkwood: remove custom .init_time hook
  ARM: imx: remove custom .init_time hook
  ARM: highbank: remove custom .init_time hook
  ARM: exynos: remove custom .init_time hook
  ARM: dove: remove custom .init_time hook
  ARM: bcm2835: remove custom .init_time hook
  ARM: bcm: provide common arch init for DT clocks
  ARM: call of_clk_init from default time_init handler
  ARM: vt8500: prepare for arch-wide .init_time callback
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 10:11:42 -07:00
Robin Murphy
d0f38f9130 arm64: update 32-bit kuser helpers to ARMv8
This patch updates the barrier semantics in the kuser helper functions
to take advantage of the ARMv8 additions to AArch32, which are
guaranteed to be available in situations where these functions will be
called.

Note that this slightly changes the cmpxchg functions in that they are
no longer necessarily full barriers if they return 1. However, the
documentation only states they include their own barriers "as needed",
not that they are obligated to act as a full barrier for the caller.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
CC: Matthew Leach <matthew.leach@arm.com>
CC: Dave Martin <dave.martin@arm.com>
CC: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-28 10:40:28 +00:00
Joe Perches
302bfe20ad s390: convert use of typedef ctl_table to struct ctl_table
This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-10-28 08:36:25 +01:00
Olof Johansson
2de1a7a855 Merge most of tag 'tags/exynos-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git into next/dt
From Kukjin Kim, these are device-tree updates for Exynos. Among the changes:
- add MIPI PHY node for exynos4
- update regulator for origen and exynos5250-arndale
- add support HDMI for exynos5250, exynos5420

* commit '93457b9cb980ffeeef020c3bcd99065c3807619b':
  ARM: dts: Add HDMI related I2C nodes for Arndale board
  ARM: dts: enable hdmi subsystem for exynos5420 smdk board
  ARM: dts: add dt nodes for hdmi subsystem for exynos5420
  ARM: dts: add i2c device nodes for Exynos5420
  ARM: dts: add clocks to hdmi dt node for exynos5250
  ARM: dts: add mixer clocks to mixer node for Exynos5250
  of/documentation: update with clock information for exynos hdmi subsystem
  ARM: dts: Disable Exynos5250 I2S controllers by default
  ARM: dts: Add reg property to regulator nodes in exynos5250-arndale
  ARM: dts: Add fixed voltage regulator to simple bus for origen
  ARM: dts: Add MIPI PHY node to exynos4.dtsi
2013-10-27 21:54:02 -07:00
Olof Johansson
3316dee245 add dmaengine based s3c24xx dma driver
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJSZFAgAAoJEA0Cl+kVi2xq5KYP/3LS6mAaeusGUXi0e4x5WpDg
 FjxI2rKgugu/jLRua5WPbcHRwqkdpipctvHhMc8bEdoO3vY+2irXsbGiR7q8qc06
 w5rPwIYmI98x36HUHUCBZPFk7N3NqYdg0fyIZ3e5SLYtbmGvpjbo93WBOReII6tU
 41pW2MKiPHxKomKui1QIEVjpoV4y1KHgXPKHKOqXxxhP9oJJTuF2qp0vh8WiHtH2
 X5oeqJeyTpRJUNtH3WuaZU5dvj934nayC5/j4BWJXGkfnbK2kJIa6imSCgLkT1eN
 4n34ILekM9YM6WMJjEwdO3C0W5RM35Xr01/G2rcoRpBbpqubWHY4m3GaiAZ1HC4H
 g3gB2kGZSfbR6iPBwsURkQM2cra/IDfo1HBYqeTXz9s0km4xLzoWlTPn09kTpwTU
 CtsPivGXIIh2qrxTLtyuD4kz8ZZ/1zf+S60YIi6K1TcImUWSzEWHgsRBPSP9kwPk
 QOdIpWaU8VkT8o1kqe08fSDP7ywVW4UUZF7futEsyPILxBg+MuWbM318TXO7Qa6z
 ukHXZEwJDX2XUe/Bf0BimPRCuLs3zQghF5dHT1gdUYQovElwLWrtJwVYsDCk/RTV
 pgXSNt2+v7mm3BU0Y64GdTeqLFFLmqg+3+asxIP2IAPcMyvENFQr/DVCiXZwTXqE
 wpTLOjzPY7HEo1G2G1pO
 =WYJE
 -----END PGP SIGNATURE-----

Merge tag 's3c24xx-dma' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers

From Kukjin Kim, this branch adds device-tree support to the DMA controller
on the older Samsung SoCs. It also adds support for one of the missing SoCs
in the family (2410).

The driver has been Ack:ed by Vinod Koul, but is merged through here due
to dependencies with platform code.

* tag 's3c24xx-dma' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: S3C24XX: add dma pdata for s3c2410, s3c2440 and s3c2442
  dmaengine: s3c24xx-dma: add support for the s3c2410 type of controller
  ARM: S3C24XX: Fix possible dma selection warning
  ARM: SAMSUNG: set s3c24xx_dma_filter for s3c64xx-spi0 device
  ARM: S3C24XX: add platform-devices for new dma driver for s3c2412 and s3c2443
  dmaengine: add driver for Samsung s3c24xx SoCs
  ARM: S3C24XX: number the dma clocks
  + Linux 3.12-rc3

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-27 21:42:44 -07:00
Olof Johansson
6251c156a6 Samsung Cleanup for v3.13
- remove unnecessary config options and header inclusions
 - use CONFIG_ARCH_S3C64XX instead of PLAT_S3C64XX
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJSZE1rAAoJEA0Cl+kVi2xq1EcQAIeUsNvSHtwo5lQgjZfPsqd9
 03mTdRsFaSduHZEI9aJ9obwEUZHzph5Cpk3SLyj9X4a2bPb4QTEKGMWDflSMQvD9
 gSmPGKEZzRXY+y63pXwVRQQh7IO91lzhgubqu3/6NzZhg3Ajbps2AfiOFakHgzFK
 mjFOo67uuNMZJ7H8gkHy0+UktZLafjfnOUaIgvdqq+ffJQLFqcViJWkmewVytLjo
 olSilzBOnbgJnF9Sr3qEz9vJemX+416XGwYXY7Okjs8OZMVYAGgzm2TK6JUwDV8Q
 BMqV5Hj0sbk6EySB5YnTeMf9MrrmNyZwupZgmQsZJ/iZUHKV72z8Do3kDAqywzhu
 logoC79awbX+KjAc2tfe3JkpGF0JpsBfG4GKA+C/ehVegtAfCS/Whd06XTibbtaS
 PHzRnlrZKXf4km7BS9TGPW0WPnsaNcm/4a21d/wlhRoW25AohH6YYReUOlglrIIs
 ZAb6kqyS62vghiRPKLN2Bz2nQqc+ENGKZ+LejMu6vhBb9iXPRZWPGjFzwfBEkVxS
 yHCfMk/k5/3I4aV7SdtwSeFzIT5zKJaYTb+3d0+FdRgwR2cln0wnxHCpbeOTndYg
 K9fwIvbXDCL8XUg25QaxvXPnuXcH1vOs5Qp9OICn3IZJnz7MNbGQGFiqo8ET6mOv
 nJ8cKtu9wSJz5d/7vlyN
 =jVqg
 -----END PGP SIGNATURE-----

Merge tag 'samsung-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup

From Kukjin Kim:
Samsung Cleanup for v3.13
- remove unnecessary config options and header inclusions
- use CONFIG_ARCH_S3C64XX instead of PLAT_S3C64XX

* tag 'samsung-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: remove CONFIG_MACH_EXYNOS[4, 5]_DT config options
  ARM: EXYNOS: remove unnecessary header inclusions from exynos4/5 dt machine file
  ARM: S3C64XX: Kill CONFIG_PLAT_S3C64XX
  ASoC: samsung: Use CONFIG_ARCH_S3C64XX to check for S3C64XX support
  s3c-camif: Use CONFIG_ARCH_S3C64XX to check for S3C64XX support
  gpio: samsung: Use CONFIG_ARCH_S3C64XX to check for S3C64XX support
  ARM: S3C64XX: Move if ARCH_S3C64XX statement into mach-s3c64xx

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-27 21:31:00 -07:00
Olof Johansson
d31a408f4f Five incremental device tree patches around the clock handling,
and adding SSP/SPI devices to the device tree.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSYYhgAAoJEEEQszewGV1zHx8QAJwXuxowqE5kqlq2gRA8R420
 yqEaP5PX/34kVzuAAkhDosqtEEmcCvKtC+OhTAlyds78fF6iSvecg0YdiTQ9vzNf
 3khW97pvCjIOyDVfKST1gjC0HVwxAVNuA9b/LhORB/3Hi3CzvRJ5PhXHf3rqPUS6
 9HN9/Y4h4zPYU+Wk3PIBAmfmg79TA7pR4l3sF2Rf63CeYC5d3Zv/x/SEAYZ2Ilqo
 TTZc4zNDUznqTnm9wM8C/FY/cg7fa3q2vlXyF1rcHle6uNAvWOFxc7nuir3nF0Qu
 NNPUk7LEAwsdQ5eK1XybNGBofSJYzsNRjWq4Lp3/DytTBH6gUKE/CUQ4A4ujJYEY
 8zhQV3wMSrs0cVhoubu9rPolVl5dGb/dtambZvwtL6RcDBBaUesixrDmLHIkTSqi
 u7WZ1kMhb5txQKmn+oNmu3qzxEXYF/mp5mYzOnurGfJ/DFTfc+mfui1WUq1ybCTz
 Z2yCku9iKyeBpyw2Kt9PVJ+qk2JWEP/c3MddJtw5YvWopkol9avkhXUnjCpSTY3R
 aO3nwusXaYSPSNZZAVkHrDruoEafAWktITEiCTWURQFd5OSYiUcHVqJ32XwOnwWD
 9wtZMLhnPkRgM4CpkzvYclUyY6Wuyy2mhd6PO305mBqQp8GZIm5dMggGctaHNi1H
 pVJ2WpQkn8mMekoI716u
 =p/3j
 -----END PGP SIGNATURE-----

Merge tag 'ux500-dt-for-v3.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/dt

From Linus Walleij:
Five incremental device tree patches around the clock handling,
and adding SSP/SPI devices to the device tree.

* tag 'ux500-dt-for-v3.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: register all SSP and SPI blocks
  ARM: ux500: fix I2C4 clock bit
  ARM: ux500: fix clock for GPIO blocks 6 and 7
  clk: ux500: fix erroneous bit assignment
  ARM: ux500: fix clock for GPIO block 8

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-27 21:19:54 -07:00
Olof Johansson
17761fc80f Allwinner sunXi SoCs minor fixes for 3.13
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSYW75AAoJEBx+YmzsjxAgC+oP/R5FltTQVWagTmrh3kwhBpWI
 pcwrPhmqAhzM9wXbZiJwhRZoVzOlmVH6QZxiaWNhKdzFDmDKuBhF82EjNb6GeuTw
 kiEaGxHz0MtkfS4HxBFc5OpItNOZ0KcfPYyCDR6UcknVDyMCUGwhDwmqIP5iJ8rX
 c3v2OlQfCXje/V89gzDOFIryvC5xCSS0+We4nuBpV1Vf5glcbrNETfmKbKHWoRSs
 m+4u8uZcGaz9saZPOLg6nAyeoU8yvH8WqWgtUDYH3GLi7gB5ra72vHrfbAT3WkL2
 ohf02IRXFunM7INCrluY79fpJnqhU2Fi8uu4hIOfKYUmQSHaxRPC8j67ipvd3mZB
 98pwqeUho/1UdI+HCzlYA/mJnm2ASfaHxt2SOf9hUkA7aUxLr+oz6vgBPSzT7U8v
 VyGCoCY0qvuWSo78j7zw0b+BUYrzm6PKrpnhqH1oj7X3hT5BAJGBInPxUrn7MCqf
 nVVMas6IfL/hAd6HXCEXnOI5daB/OjVqQb28grjWi9k4prOkT1/oeuVdbdf2cX7h
 992La0HhUvAzv4k5ZNa3UexEyvxNT1mfxSGBHGmOybr2R677ZFcet2kradnPnAem
 8FTCsZhjyMpYasB/H5aO1VNg0UYpcXJ/m80jrDqyttRSpUuUkRUBoNMBDDjSk3yU
 GqlqOJurLHSUevdMQeiP
 =qexQ
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-3.13' of https://github.com/mripard/linux into next/dt

From Maxime Ripard:
Allwinner sunXi SoCs minor fixes for 3.13

* tag 'sunxi-fixes-for-3.13' of https://github.com/mripard/linux:
  ARM: sun6i: Fix the APB2 clock gates register size

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-27 21:15:45 -07:00
Olof Johansson
c90d19be27 Allwinner sunXi SoCs device tree changes for 3.13
This DT series sees the introduction of the cubietruck DT, plus the addition of
 the i2c controller for the A20 based boards, and of the Security ID found in
 all the Allwinner SoCs but the A31.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSYW3yAAoJEBx+YmzsjxAg5HoP/jCsw/QQ+Po6fvf3h0C1PLQs
 JKPredNJwaAjv436zawhlOZWSm6kj0qI6EKshtFUnOm436Ie5vAV/HthlI3vImBs
 xtnaCCphfBRB/9MpjOaqQILBMGiVFbI5Rfsx1VgY3lOnLG7yp87PLJ/2d1h+drKF
 21LgjkDtc5zP1X+42bNF+oK0UDVkWJUxPxcm5JlwYQUFUBoE/FIqUKU5LM5/fsXE
 26eeFPQnf2zqW0Bxx09Jd8wKdRWXLM1+JVlgH+NG2KPL3g5kFbaHHfElzMgsal81
 JKk4qmefGcfzLyJAUPTV8B002o4FKGiwaLZdULDVAXFQcJP6AONTCW9cbNAqTZdE
 6wSwvo01LOFaAXqJD1HB56ZCASc4qXaoq0vK4Jdefjjb7x4MDeNPD89L6sK21TaQ
 atHtFPvzElPyQw5kfJpBypAwSB9+iCk78L7OO2g6bAKvR9WPS2QWr+K7ipuILooT
 c9QX9ww9wIMg8whumKsKGkGreSi075FXoSyhF7NEz3TR8P7ghCUdFuK5pdLhiXXi
 W/ZejujJDMDjuJtW8VblXFBNa6VrPab51jp5fs+k4IJWDcLbnSpD5PbetMZRNlce
 DYAPqhmlx96R2bwzr1Cq+7Ww+7G+xd1HgTh5wZElm2JtBGHVkXOEZbb85stZ5bA8
 i4/5xcEPIFExI69Dj9LV
 =Qc5W
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt-for-3.13' of https://github.com/mripard/linux into next/dt

From Maxime Ripard:
Allwinner sunXi SoCs device tree changes for 3.13

This DT series sees the introduction of the cubietruck DT, plus the addition of
the i2c controller for the A20 based boards, and of the Security ID found in
all the Allwinner SoCs but the A31.

* tag 'sunxi-dt-for-3.13' of https://github.com/mripard/linux:
  ARM: sunxi: dts: Add support for the cubieboard3, the CubieTruck
  ARM: sun7i: olinuxino-micro: Enable the I2C controllers
  ARM: sun7i: cubieboard2: Enable the I2C controllers
  ARM: sun7i: Add the pin muxing options for the I2C controllers
  ARM: sun7i: Enable the I2C controllers
  ARM: sunxi: dt: Add sunxi-sid to dts for sun4i, sun5i and sun7i

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-27 21:14:40 -07:00
Helge Deller
54e181e073 parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM
Since the beginning of the parisc-linux port, sometimes 64bit SMP kernels were
not able to bring up other CPUs than the monarch CPU and instead crashed the
kernel.  The reason was unclear, esp. since it involved various machines (e.g.
J5600, J6750 and SuperDome). Testing showed, that those crashes didn't happened
when less than 4GB were installed, or if a 32bit Linux kernel was booted.

In the end, the fix for those SMP problems is trivial:
During the early phase of the initialization of the CPUs, including the monarch
CPU, the PDC_PSW firmware function to enable WIDE (=64bit) mode is called.
It's documented that this firmware function may clobber various registers, and
one one of those possibly clobbered registers is %cr30 which holds the task
thread info pointer.

Now, if %cr30 would always have been clobbered, then this bug would have been
detected much earlier. But lots of testing finally showed, that - at least for
%cr30 - on some machines only the upper 32bits of the 64bit register suddenly
turned zero after the firmware call.

So, after finding the root cause, the explanation for the various crashes
became clear:
- On 32bit SMP Linux kernels all upper 32bit were zero, so we didn't faced this
  problem.
- Monarch CPUs in 64bit mode always booted sucessfully, because the inital task
  thread info pointer was below 4GB.
- Secondary CPUs booted sucessfully on machines with less than 4GB RAM because
  the upper 32bit were zero anyay.
- Secondary CPus failed to boot if we had more than 4GB RAM and the task thread
  info pointer was located above the 4GB boundary.

Finally, the patch to fix this problem is trivial by saving the %cr30 register
before the firmware call and restoring it afterwards.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: <stable@vger.kernel.org> # 2.6.12+
Signed-off-by: Helge Deller <deller@gmx.de>
2013-10-27 15:58:44 +01:00
Jan Beulich
ee5872befc x86/time: Honor ACPI FADT flag indicating absence of a CMOS RTC
Even though the omission was found only during code review
(originally in the Xen hypervisor, looking through ACPI v5 flags
and their meanings and uses), we shouldn't be creating a
corresponding platform device in that case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/5265029D02000078000FC4D2@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-10-26 13:36:00 +02:00
Jan Beulich
09dc68d958 x86/cpu: Track legacy CPU model data only on 32-bit kernels
struct cpu_dev's c_models is only ever set inside CONFIG_X86_32
conditionals (or code that's being built for 32-bit only), so
there's no use of reserving the (empty) space for the model
names in a 64-bit kernel.

Similarly, c_size_cache is only used in the #else of a
CONFIG_X86_64 conditional, so reserving space for (and in one
case even initializing) that field is pointless for 64-bit
kernels too.

While moving both fields to the end of the structure, I also
noticed that:

 - the c_models array size was one too small, potentially causing
   table_lookup_model() to return garbage on Intel CPUs (intel.c's
   instance was lacking the sentinel with family being zero), so the
   patch bumps that by one,

 - c_models' vendor sub-field was unused (and anyway redundant
   with the base structure's c_x86_vendor field), so the patch deletes it.

Also rename the legacy fields so that their legacy nature stands out
and comment their declarations.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/5265036802000078000FC4DB@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-10-26 13:34:39 +02:00
Jan Beulich
7a3d9b0f3a x86: Unify copy_to_user() and add size checking to it
Similarly to copy_from_user(), where the range check is to
protect against kernel memory corruption, copy_to_user() can
benefit from such checking too: Here it protects against kernel
information leaks.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: <arjan@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/5265059502000078000FC4F6@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
2013-10-26 12:27:37 +02:00
Jan Beulich
3df7b41aa5 x86: Unify copy_from_user() size checking
Commits 4a31276930 ("x86: Turn the
copy_from_user check into an (optional) compile time warning")
and 63312b6a6f ("x86: Add a
Kconfig option to turn the copy_from_user warnings into errors")
touched only the 32-bit variant of copy_from_user(), whereas the
original commit 9f0cf4adb6 ("x86:
Use __builtin_object_size() to validate the buffer size for
copy_from_user()") also added the same code to the 64-bit one.

Further the earlier conversion from an inline WARN() to the call
to copy_from_user_overflow() went a little too far: When the
number of bytes to be copied is not a constant (e.g. [looking at
3.11] in drivers/net/tun.c:__tun_chr_ioctl() or
drivers/pci/pcie/aer/aer_inject.c:aer_inject_write()), the
compiler will always have to keep the funtion call, and hence
there will always be a warning. By using __builtin_constant_p()
we can avoid this.

And then this slightly extends the effect of
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS in that apart from
converting warnings to errors in the constant size case, it
retains the (possibly wrong) warnings in the non-constant size
case, such that if someone is prepared to get a few false
positives, (s)he'll be able to recover the current behavior
(except that these diagnostics now will never be converted to
errors).

Since the 32-bit variant (intentionally) didn't call
might_fault(), the unification results in this being called
twice now. Adding a suitable #ifdef would be the alternative if
that's a problem.

I'd like to point out though that with
__compiletime_object_size() being restricted to gcc before 4.6,
the whole construct is going to become more and more pointless
going forward. I would question however that commit
2fb0815c9e ("gcc4: disable
__compiletime_object_size for GCC 4.6+") was really necessary,
and instead this should have been dealt with as is done here
from the beginning.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/5265056D02000078000FC4F3@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-10-26 12:27:36 +02:00
Ingo Molnar
d69525789e Merge tag 'please-pull-eMCA-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras into x86/mce
Pull MCE updates from Tony Luck:

 "There is a enhanced error logging mechanism for Xeon processors.

  Full description is here:

    http://www.intel.com/content/www/us/en/architecture-and-technology/enhanced-mca-logging-xeon-paper.html

  This patch series provides a module (and support code) to
  check for an extended error log and print extra details about
  the error on the console.
  "

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-10-26 12:08:29 +02:00
Sebastian Reichel
30dae2f986 leds: lp55xx: handle enable pin in driver
This patch moves the handling of the chip's enable pin from the board
code into the driver. It also updates all board-code files using the
driver to incorporate this change.

This is needed for device tree support of the enable pin.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-10-25 10:13:25 -07:00
Vinayak Kale
c019de3de6 arm64: perf: fix event number mask
This patch fixes ARMV8_EVTYPE_* macros since evtCount (event number)
field width is 10bits in event selection register.

Signed-off-by: Vinayak Kale <vkale@apm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 16:23:52 +01:00
Will Deacon
a872013d6d arm64: kconfig: allow CPU_BIG_ENDIAN to be selected
This patch wires up CONFIG_CPU_BIG_ENDIAN for the AArch64 kernel
configuration.

Selecting this option builds a big-endian kernel which can boot into a
big-endian userspace.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 16:10:45 +01:00
Catalin Marinas
4a12cae7ef arm64: Fix the endianness of arch_spinlock_t
The owner and next members of the arch_spinlock_t structure need to be
swapped when compiling for big endian.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Matthew Leach <matthew.leach@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
2013-10-25 16:10:22 +01:00
Matthew Leach
710be9ac4e arm64: big-endian: write CPU holding pen address as LE
Currently when CPUs are brought online via a spin-table, the address
they should jump to is written to the cpu-release-addr in the kernel's
native endianness. As the kernel may switch endianness, secondaries
might read the value byte-reversed from what was intended, and they
would jump to the wrong address.

As the only current arm64 spin-table implementations are
little-endian, stricten up the arm64 spin-table definition such that
the value written to cpu-release-addr is _always_ little-endian
regardless of the endianness of any CPU. If a spinning CPU is
operating big-endian, it must byte-reverse the value before jumping to
handle this.

Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 15:59:42 +01:00
Matthew Leach
9cf7172893 arm64: big-endian: set correct endianess on kernel entry
The endianness of memory accesses at EL2 and EL1 are configured by
SCTLR_EL2.EE and SCTLR_EL1.EE respectively. When the kernel is booted,
the state of SCTLR_EL{2,1}.EE is unknown, and thus the kernel must
ensure that they are set before performing any memory accesses.

This patch ensures that SCTLR_EL{2,1} are configured appropriately at
boot for kernels of either endianness.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
[catalin.marinas@arm.com: fix SCTLR_EL1.E0E bit setting in head.S]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 15:59:41 +01:00
Matthew Leach
828e9834e9 arm64: head: create a new function for setting the boot_cpu_mode flag
Currently, the code for setting the __cpu_boot_mode flag is munged in
with el2_setup. This makes things difficult on a BE bringup as a
memory access has to have occurred before el2_setup which is the place
that we'd like to set the endianess on the current EL.

Create a new function for setting __cpu_boot_mode and have el2_setup
return the mode the CPU. Also define a new constant in virt.h,
BOOT_CPU_MODE_EL1, for readability.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 15:59:39 +01:00
Matthew Leach
e68bedaa03 arm64: asm: add CPU_LE & CPU_BE assembler helpers
Add CPU_LE and CPU_BE to select assembler code in little and big
endian configurations respectively.

Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 15:59:38 +01:00
Matthew Leach
a1d5ebaf8c arm64: big-endian: don't treat code as data when copying sigret code
Currently the sigreturn compat code is copied to an offset in the
vectors table. When using a BE kernel this data will be stored in the
wrong endianess so when returning from a signal on a 32-bit BE system,
arbitrary code will be executed.

Instead of declaring the code inside a struct and copying that, use
the assembler's .byte directives to store the code in the correct
endianess regardless of platform endianess.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 15:59:37 +01:00
Matthew Leach
55b89540b0 arm64: compat: correct register concatenation for syscall wrappers
The arm64 port contains wrappers for arm32 syscalls that pass 64-bit
values. These wrappers concatenate the two registers to hold a 64-bit
value in a single X register. On BE, however, the lower and higher
words are swapped.

Create a new assembler macro, regs_to_64, that when on BE systems
swaps the registers in the orr instruction.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 15:59:36 +01:00
Will Deacon
a795a38eb9 arm64: compat: add support for big-endian (BE8) AArch32 binaries
This patch adds support for BE8 AArch32 tasks to the compat layer.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 15:59:35 +01:00
Will Deacon
94ed1f2cb5 arm64: setup: report ELF_PLATFORM as the machine for utsname
uname -m reports the machine field from the current utsname, which should
reflect the endianness of the system.

This patch reports ELF_PLATFORM for the field, so that everything appears
consistent from userspace.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 15:59:34 +01:00
Will Deacon
5436b5c830 arm64: ELF: add support for big-endian executables
This patch adds support for the aarch64_be ELF format to the AArch64 ELF
loader.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-10-25 15:59:33 +01:00