Commit Graph

95187 Commits

Author SHA1 Message Date
Anton Blanchard 14ad0c58d5 powerpc/powernv: Fix little endian issues in OPAL error log code
Fix little endian issues with the OPAL error log code.

Signed-off-by: Anton Blanchard <anton@samba.org>
Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:11:23 +10:00
Anton Blanchard 56b4c99312 powerpc/powernv: Fix little endian issues with opal_do_notifier calls
The bitmap in opal_poll_events and opal_handle_interrupt is
big endian, so we need to byteswap it on little endian builds.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:11:22 +10:00
Anton Blanchard e2c8b93e65 powerpc/powernv: Remove some OPAL function declaration duplication
We had some duplication of the internal OPAL functions.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:11:21 +10:00
Anton Blanchard 2bad742388 powerpc/powernv: Use uint64_t instead of size_t in OPAL APIs
Using size_t in our APIs is asking for trouble, especially
when some OPAL calls use size_t pointers.

Signed-off-by: Anton Blanchard <anton@samba.org>
Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:11:21 +10:00
Wei Yang 4966bfa1b3 powerpc/powernv: Release the refcount for pci_dev
On PowerNV platform, we are holding an unnecessary refcount on a pci_dev, which
leads to the pci_dev is not destroyed when hotplugging a pci device.

This patch release the unnecessary refcount.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:11:20 +10:00
Wei Yang 3f28c5af39 powerpc/powernv: Reduce multi-hit of iommu_add_device()
During the EEH hotplug event, iommu_add_device() will be invoked three times
and two of them will trigger warning or error.

The three times to invoke the iommu_add_device() are:

    pci_device_add
       ...
       set_iommu_table_base_and_group   <- 1st time, fail
    device_add
       ...
       tce_iommu_bus_notifier           <- 2nd time, succees
    pcibios_add_pci_devices
       ...
       pcibios_setup_bus_devices        <- 3rd time, re-attach

The first time fails, since the dev->kobj->sd is not initialized. The
dev->kobj->sd is initialized in device_add().
The third time's warning is triggered by the re-attach of the iommu_group.

After applying this patch, the error

    iommu_tce: 0003:05:00.0 has not been added, ret=-14

and the warning

    [  204.123609] ------------[ cut here ]------------
    [  204.123645] WARNING: at arch/powerpc/kernel/iommu.c:1125
    [  204.123680] Modules linked in: xt_CHECKSUM nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6t_REJECT bnep bluetooth 6lowpan_iphc rfkill xt_conntrack ebtable_nat ebtable_broute bridge stp llc mlx4_ib ib_sa ib_mad ib_core ib_addr ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw bnx2x tg3 mlx4_core nfsd ptp mdio ses libcrc32c nfs_acl enclosure be2net pps_core shpchp lockd kvm uinput sunrpc binfmt_misc lpfc scsi_transport_fc ipr scsi_tgt
    [  204.124356] CPU: 18 PID: 650 Comm: eehd Not tainted 3.14.0-rc5yw+ #102
    [  204.124400] task: c0000027ed485670 ti: c0000027ed50c000 task.ti: c0000027ed50c000
    [  204.124453] NIP: c00000000003cf80 LR: c00000000006c648 CTR: c00000000006c5c0
    [  204.124506] REGS: c0000027ed50f440 TRAP: 0700   Not tainted  (3.14.0-rc5yw+)
    [  204.124558] MSR: 9000000000029032 <SF,HV,EE,ME,IR,DR,RI>  CR: 88008084  XER: 20000000
    [  204.124682] CFAR: c00000000006c644 SOFTE: 1
    GPR00: c00000000006c648 c0000027ed50f6c0 c000000001398380 c0000027ec260300
    GPR04: c0000027ea92c000 c00000000006ad00 c0000000016e41b0 0000000000000110
    GPR08: c0000000012cd4c0 0000000000000001 c0000027ec2602ff 0000000000000062
    GPR12: 0000000028008084 c00000000fdca200 c0000000000d1d90 c0000027ec281a80
    GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
    GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
    GPR24: 000000005342697b 0000000000002906 c000001fe6ac9800 c000001fe6ac9800
    GPR28: 0000000000000000 c0000000016e3a80 c0000027ea92c090 c0000027ea92c000
    [  204.125353] NIP [c00000000003cf80] .iommu_add_device+0x30/0x1f0
    [  204.125399] LR [c00000000006c648] .pnv_pci_ioda_dma_dev_setup+0x88/0xb0
    [  204.125443] Call Trace:
    [  204.125464] [c0000027ed50f6c0] [c0000027ed50f750] 0xc0000027ed50f750 (unreliable)
    [  204.125526] [c0000027ed50f750] [c00000000006c648] .pnv_pci_ioda_dma_dev_setup+0x88/0xb0
    [  204.125588] [c0000027ed50f7d0] [c000000000069cc8] .pnv_pci_dma_dev_setup+0x78/0x340
    [  204.125650] [c0000027ed50f870] [c000000000044408] .pcibios_setup_device+0x88/0x2f0
    [  204.125712] [c0000027ed50f940] [c000000000046040] .pcibios_setup_bus_devices+0x60/0xd0
    [  204.125774] [c0000027ed50f9c0] [c000000000043acc] .pcibios_add_pci_devices+0xdc/0x1c0
    [  204.125837] [c0000027ed50fa50] [c00000000086f970] .eeh_reset_device+0x36c/0x4f0
    [  204.125939] [c0000027ed50fb20] [c00000000003a2d8] .eeh_handle_normal_event+0x448/0x480
    [  204.126068] [c0000027ed50fbc0] [c00000000003a35c] .eeh_handle_event+0x4c/0x340
    [  204.126192] [c0000027ed50fc80] [c00000000003a74c] .eeh_event_handler+0xfc/0x1b0
    [  204.126319] [c0000027ed50fd30] [c0000000000d1ea0] .kthread+0x110/0x130
    [  204.126430] [c0000027ed50fe30] [c00000000000a460] .ret_from_kernel_thread+0x5c/0x7c
    [  204.126556] Instruction dump:
    [  204.126610] 7c0802a6 fba1ffe8 fbc1fff0 fbe1fff8 f8010010 f821ff71 7c7e1b78 60000000
    [  204.126787] 60000000 e87e0298 3143ffff 7d2a1910 <0b090000> 2fa90000 40de00c8 ebfe0218
    [  204.126966] ---[ end trace 6e7aefd80add2973 ]---

are cleared.

This patch removes iommu_add_device() in pnv_pci_ioda_dma_dev_setup(), which
revert part of the change in commit d905c5df(PPC: POWERNV: move
iommu_add_device earlier).

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:11:20 +10:00
Anton Blanchard cc146d1db0 powerpc/powernv: Fix little endian issues in OPAL flash code
With this patch I was able to update firmware on an LE kernel.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:08:50 +10:00
Benjamin Herrenschmidt 298b34d7d5 powerpc/powernv: Fix kexec races going back to OPAL
We have a subtle race when sending CPUs back to OPAL on kexec.

We mark them as "in real mode" right before we send them down. Once
we've booted the new kernel, it might try to call opal_reinit_cpus()
to change endianness, and that requires all CPUs to be spinning inside
OPAL.

However there is no synchronization here and we've observed cases
where the returning CPUs hadn't established their new state inside
OPAL before opal_reinit_cpus() is called, causing it to fail.

The proper fix is to actually wait for them to go down all the way
from the kexec'ing kernel.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:08:50 +10:00
Joel Stanley 63aecfb20a powerpc/powernv: Check sysparam size before creation
The size of the sysparam sysfs files is determined from the device tree
at boot. However the buffer is hard coded to 64 bytes. If we encounter a
parameter that is larger than 64, or miss-parse the device tree, the
buffer will overflow when reading or writing to the parameter.

Check it at discovery time, and if the parameter is too large, do not
create a sysfs entry for it.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:08:49 +10:00
Joel Stanley 16003d235b powerpc/powernv: Fix typos in sysparam code
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:08:49 +10:00
Joel Stanley 85390378f0 powerpc/powernv: Check sysfs size before copying
The sysparam code currently uses the userspace supplied number of
bytes when memcpy()ing in to a local 64-byte buffer.

Limit the maximum number of bytes by the size of the buffer.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:08:48 +10:00
Joel Stanley b8569d2304 powerpc/powernv: Use ssize_t for sysparam return values
The OPAL calls are returning int64_t values, which the sysparam code
stores in an int, and the sysfs callback returns ssize_t. Make code a
easier to read by consistently using ssize_t.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:08:48 +10:00
Joel Stanley ba9a32b176 powerpc/powernv: Fix sysparam sysfs error handling
When a sysparam query in OPAL returned a negative value (error code),
sysfs would spew out a decent chunk of memory; almost 64K more than
expected. This was traced to a sign/unsigned mix up in the OPAL sysparam
sysfs code at sys_param_show.

The return value of sys_param_show is a ssize_t, calculated using

  return ret ? ret : attr->param_size;

Alan Modra explains:

  "attr->param_size" is an unsigned int, "ret" an int, so the overall
  expression has type unsigned int.  Result is that ret is cast to
  unsigned int before being cast to ssize_t.

Instead of using the ternary operator, set ret to the param_size if an
error is not detected. The same bug exists in the sysfs write callback;
this patch fixes it in the same way.

A note on debugging this next time: on my system gcc will warn about
this if compiled with -Wsign-compare, which is not enabled by -Wall,
only -Wextra.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:08:47 +10:00
Li Zhong 4fb8d027dc powerpc: Fix Oops in rtas_stop_self()
commit 41dd03a9 may cause Oops in rtas_stop_self().

The reason is that the rtas_args was moved into stack space. For a box
with more that 4GB RAM, the stack could easily be outside 32bit range,
but RTAS is 32bit.

So the patch moves rtas_args away from stack by adding static before
it.

Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: stable@vger.kernel.org # 3.14+
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:08:47 +10:00
Jeff Mahoney 28ea3c7529 powerpc: Export flush_icache_range
Commit aac416fc38 (lkdtm: flush icache and report actions) calls
flush_icache_range from a module. It's exported on most architectures
that implement it, but not on powerpc. This patch exports it to fix
the module link failure.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-04-28 13:08:46 +10:00
Linus Torvalds ac6c9e2bed Merge branch 'safe-dirty-tlb-flush'
This merges the patch to fix possible loss of dirty bit on munmap() or
madvice(DONTNEED).  If there are concurrent writers on other CPU's that
have the unmapped/unneeded page in their TLBs, their writes to the page
could possibly get lost if a third CPU raced with the TLB flush and did
a page_mkclean() before the page was fully written.

Admittedly, if you unmap() or madvice(DONTNEED) an area _while_ another
thread is still busy writing to it, you deserve all the lost writes you
could get.  But we kernel people hold ourselves to higher quality
standards than "crazy people deserve to lose", because, well, we've seen
people do all kinds of crazy things.

So let's get it right, just because we can, and we don't have to worry
about it.

* safe-dirty-tlb-flush:
  mm: split 'tlb_flush_mmu()' into tlb flushing and memory freeing parts
2014-04-27 15:08:12 -07:00
Linus Torvalds 2b9d1c050d Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull arm fixes from Russell King:
 "A number of fixes for the PJ4/iwmmxt changes which arm-soc forced me
  to take during the merge window.  This stuff should have been better
  tested and sorted out *before* the merge window"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8042/1: iwmmxt: allow to build iWMMXt on Marvell PJ4B
  ARM: 8041/1: pj4: fix cpu_is_pj4 check
  ARM: 8040/1: pj4: properly detect existence of iWMMXt coprocessor
  ARM: 8039/1: pj4: enable iWMMXt only if CONFIG_IWMMXT is set
  ARM: 8038/1: iwmmxt: explicitly check for supported architectures
2014-04-27 12:55:04 -07:00
Linus Torvalds afa3cad746 - compat renameat2 syscall wiring and __NR_compat_syscalls fix
- TLB fix for transparent huge pages following switch to generic
   mmu_gather
 - spinlock initialisation for init_mm's context
 - move of_clk_init() earlier
 - Kconfig duplicate entry fix
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (GNU/Linux)
 
 iQIcBAABAgAGBQJTW4KqAAoJEGvWsS0AyF7xMpcQAIB7dERyKiHXMYtoJirwkaKJ
 Pi02y25a80n2Ru4Y8mWu3xf52BBJrKXTyek5i5ztkD7kmVNdjgnsTp3bAqgjYmH2
 08Q7UlGC4eWlGKiGe3h+1WLJdQYqBQWFXoyTBIhU3gdGldN4EphnHqxxIGLiflu8
 /bGRzsJDzKI8XVbXv0ZStHk4DI3mpzSbQolyAnxIvtLF9iMNP43h/0+yMgYvW2gs
 S1ShPl71Cf4aOCk73SgH0GXJinCC6v9w8TFcy+FGlJhULo0sc0EXzpvsRac08OGf
 QyADYx/yMrwI/DCh+uncoByuS54u5Z1MGIJ68Uvc6GMqjkfurvjUhBFFHxjFCI+g
 SVmIrItt0CQRVl/2LszFFQnQlLP5MwYNQnF5Gb8lZhZgy7AAE43h3iSeL5dHUuJK
 vhUxfCvNSLP09+crVfDwZsLR9aAjcRyIcYpFfXAePa/rtn2pX/ICWBCVOOw/j3ii
 9kWDnk+pqQLutu6FFO7Isu1QC7M5fxSlek5WqexSOJMa5VVUgYXz2cXm1V3I+WW8
 TVFM4PuM81PjgmtZHq9R8WC37lEuIS2Ib0ph/E20keztB8t/ggC7pFS4J9fqGmQp
 MYBpiAm6PVtWCuIdwkS3L4Xv1/63Za7/CZWIL+pVaQfv6Ruk8a0IWzuiF0E0w3ak
 gqAxd5erxudNADIxDfvo
 =cSni
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:
 - compat renameat2 syscall wiring and __NR_compat_syscalls fix
 - TLB fix for transparent huge pages following switch to generic
   mmu_gather
 - spinlock initialisation for init_mm's context
 - move of_clk_init() earlier
 - Kconfig duplicate entry fix

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: init: Move of_clk_init to time_init
  arm64: initialize spinlock for init_mm's context
  arm64: debug: remove noisy, pointless warning
  arm64: mm: Add THP TLB entries to general mmu_gather
  arm64: add renameat2 compat syscall
  ARM64: Remove duplicated Kconfig entry for "kernel/power/Kconfig"
  arm64: __NR_compat_syscalls fix
2014-04-27 12:54:05 -07:00
Linus Torvalds d9e9e8e2fe Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
 "A slighlty large fix for a subtle issue in the CPU hotplug code of
  certain ARM SoCs, where the not yet online cpu needs to setup the cpu
  local timer and needs to set the interrupt affinity to itself.
  Setting interrupt affinity to a not online cpu is prohibited and
  therefor the timer interrupt ends up on the wrong cpu, which leads to
  nasty complications.

  The SoC folks tried to hack around that in the SoC code in some more
  than nasty ways.  The proper solution is to have a way to enforce the
  affinity setting to a not online cpu.  The core patch to the genirq
  code provides that facility and the follow up patches make use of it
  in the GIC interrupt controller and the exynos timer driver.

  The change to the core code has no implications to existing users,
  except for the rename of the locked function and therefor the
  necessary fixup in mips/cavium.  Aside of that, no runtime impact is
  possible, as none of the existing interrupt chips implements anything
  which depends on the force argument of the irq_set_affinity()
  callback"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: Exynos_mct: Register clock event after request_irq()
  clocksource: Exynos_mct: Use irq_force_affinity() in cpu bringup
  irqchip: Gic: Support forced affinity setting
  genirq: Allow forcing cpu affinity of interrupts
2014-04-27 11:21:03 -07:00
Linus Torvalds d0c15ad760 Staging / IIO driver fixes for 3.15-rc3
Here are some small staging and IIO driver fixes for 3.15-rc3.
 
 Nothing major at all, just some assorted issues that people have reported.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlNcTrIACgkQMUfUDdst+ymTPACfQTyAgaXWKIOEAk2Ur8YeSqhr
 NxYAn0T1tgCRuNNtj6/TnGN8RxzaMqtZ
 =9ZEj
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging / IIO driver fixes from Greg KH:
 "Here are some small staging and IIO driver fixes for 3.15-rc3.

  Nothing major at all, just some assorted issues that people have
  reported"

* tag 'staging-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: comedi: usbdux: bug fix for accessing 'ao_chanlist' in private data
  iio: adc: mxs-lradc: fix warning when buidling on avr32
  iio: cm36651: Fix i2c client leak and possible NULL pointer dereference
  iio: querying buffer scan_mask should return 0/1
  staging:iio:ad2s1200 fix a missing break
  iio: adc: at91_adc: correct default shtim value
  ARM: at91: at91sam9260: change at91_adc name
  ARM: at91: at91sam9g45: change at91_adc name
  iio: cm32181: Fix read integration time function
  iio: adc: at91_adc: Repair broken platform_data support
2014-04-27 10:34:29 -07:00
Linus Torvalds 005fbcd034 Driver core fixes for 3.15-rc3
Here are some kernfs fixes for 3.15-rc3 that resolve some reported
 problems.  Nothing huge, but all needed.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlNcTwEACgkQMUfUDdst+yktKQCeOZdKHq6J2od49bnwsPIlne1J
 h2kAoKs1LpEBHI/2KH/6etP5Qjks5iuB
 =5BPH
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here are some kernfs fixes for 3.15-rc3 that resolve some reported
  problems.  Nothing huge, but all needed"

* tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  s390/ccwgroup: Fix memory corruption
  kernfs: add back missing error check in kernfs_fop_mmap()
  kernfs: fix a subdir count leak
2014-04-27 10:28:34 -07:00
Will Deacon 4e4468fac4 ARM: KVM: disable KVM in Kconfig on big-endian systems
KVM currently crashes and burns on big-endian hosts, so don't allow it
to be selected until we've got that fixed.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2014-04-26 04:20:03 -07:00
Linus Torvalds 1cf35d4771 mm: split 'tlb_flush_mmu()' into tlb flushing and memory freeing parts
The mmu-gather operation 'tlb_flush_mmu()' has done two things: the
actual tlb flush operation, and the batched freeing of the pages that
the TLB entries pointed at.

This splits the operation into separate phases, so that the forced
batched flushing done by zap_pte_range() can now do the actual TLB flush
while still holding the page table lock, but delay the batched freeing
of all the pages to after the lock has been dropped.

This in turn allows us to avoid a race condition between
set_page_dirty() (as called by zap_pte_range() when it finds a dirty
shared memory pte) and page_mkclean(): because we now flush all the
dirty page data from the TLB's while holding the pte lock,
page_mkclean() will be held up walking the (recently cleaned) page
tables until after the TLB entries have been flushed from all CPU's.

Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Dave Hansen <dave.hansen@intel.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-25 16:05:40 -07:00
Linus Torvalds 3fe89d2e76 ARM: SoC fixes for 3.15-rc3:
Since we didn't get around to collect fixes in time for -rc2 over
 the easter vacation, this one is unfortunately a bit larger than
 we'd like for an -rc3 merge. A large set of the changes is in the
 device tree sources, so I'm splitting out the description between
 code changes and DT changes. Aside from omap and versatile express,
 the actual code bugs are sporadic and trivial. Here is an overview:
 
   imx:
    - fix video clock settings
    - fix one clock refcounting bug
 
   omap:
    - update defconfig for renamed USB PHY driver
    - fix error handling in gpmc
    - fix N900 video initialization regression
    - fix reression in hwmod code from missing braces
    - fix am43xx and omap3 clocks
    - remove bogus write to voltage control register
 
   pxa:
    - fix build regression from 3.13 header cleanup
 
   rockchip:
    - fix a misleading printk string
 
   shmobile:
    - fix incorrect sound setting on multiple machines
 
   spear:
    - remove incorrect __init section annotation
 
   tegra:
    - remove a stale Kconfig entry
 
   u300:
    - update defconfig
 
   ux500:
    - enable common wireless and sensor drivers in defconfig
    - more defconfig updates
 
   vexpress:
    - fix voltage calculation for opp
    - fix reboot hang and warning
    - fix out-of-bounds array access
    - improve error handling in clock driver
 
   overall:
    - always select CLKSRC_OF in multiplatform builds
 
 And these are the devicetree related changes:
 
   imx:
    - add missing #clock-cell properties
    - fix pinctrl setting in imx6sl-evk
    - fix video endpoint on imx53
    - remove obsolete lvds-channel nodes (multiple patches)
    - add missing second stmpe node
    - fix usb host mode on dmo-edmqmx6 (multiple patches)
    - fix gic node #address-cells to match usage
    - add missing legacy IRQ map for PCIe
    - fix microsom pincontrol setting for rgmii
    - fix fatal typo in touchscreen DT usage for mx5
    - list all RAM present on m53evk and mx53qsb
 
   omap:
    - fix bug in DT handling of gpmc external bus
    - add DT for older revision of beagleboard
    - fix regression after DT node name fixes
    - remove obsolete properties for gpmc
    - fix pinmux comment to match DT it refers to
    - fix newly added dra7xx clock node data
    - add missing clock for USB PHY
 
   mvebu:
    - add missing clock for mdio node
    - fix nonstandard vendor prefixes on i2c nodes
 
   rockchip:
    - fix pin control setting for uart
 
   shmobile:
    - fix typo in DT data for pin control (multiple patches)
    - fix gic node #address-cells to match usage
 
   tegra:
    - fix clock and uart DT representation to match hardware
 
   zynq:
    - add DT nodes for newly added driver
    - add DT properties required for cpufreq-ondemand
 
   overall:
    - restore alphabetic order in Makefile
    - grammar fixes in bindings
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAU1pK92CrR//JCVInAQLerA/9GwLHJIBU6osKnZtIWDYPhYj81uRxgF5Q
 qtaUdsSoDQmIiW8tzJL0VUBJQfSpPtf4hsIPh5dMKclalx+0kca3zpPepo58rvEP
 zG39OIK/fBsmD/eVkz0y3lG5BUu9/1gkpnM8jSEmkDWqcNX8wQoOeHSrWXWzEk1G
 2eZlXsYr9OVuIGRx14wnINvPuD2Z75zEXA7KDbDuYqauQvVojj5wH6s8R7Ujy7e1
 +NGCThkLJUF2wid+6QmVk9D6tQXyVxmf+cr080n58LmOmoVnoFkCjs5gaUUIP8Zb
 nM97PQly0s1JIRn+9jF7+U0KNyp9eec7Ogc00tpvvBmQI2kVfHfSRROLq+tDGu1t
 nEEy52X/QVgWWY+1qUl+gqIWWmMTpniDF1pd/5jP3jKXUc/sM7OfLGQaTP4O7sR6
 5MlfvqvSO/EaMeWEvX4e8+Z+2dY1qFZUYk7VtamqmOegzkcDjAiJ3aQNozuqq9JH
 TTHbA2Em9VGC1LlAMAg7h46rM//npCeJ0Q5yjuFk093UBEbAF4HWO2PFNrdohKzC
 Yz/R+vkvGeQ98K/4jj4UIyjcB4PUX+DRrozC10i2XCQh+UIYdgC4dFQz1nH/4iQS
 CrdSRmDvpZDjSFV5m4+QVkaEsTJnXX6vV62VBVRcSLkqyfPABWj1y9c2L3K8kfBJ
 6nbficflFqE=
 =PPo/
 -----END PGP SIGNATURE-----

Merge tag 'fixes-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "Since we didn't get around to collect fixes in time for -rc2 over the
  easter vacation, this one is unfortunately a bit larger than we'd like
  for an -rc3 merge.

  A large set of the changes is in the device tree sources, so I'm
  splitting out the description between code changes and DT changes.
  Aside from omap and versatile express, the actual code bugs are and
  trivial.  Here is an overview:

  imx:
   - fix video clock settings
   - fix one clock refcounting bug

  omap:
   - update defconfig for renamed USB PHY driver
   - fix error handling in gpmc
   - fix N900 video initialization regression
   - fix reression in hwmod code from missing braces
   - fix am43xx and omap3 clocks
   - remove bogus write to voltage control register

  pxa:
   - fix build regression from 3.13 header cleanup

  rockchip:
   - fix a misleading printk string

  shmobile:
   - fix incorrect sound setting on multiple machines

  spear:
   - remove incorrect __init section annotation

  tegra:
   - remove a stale Kconfig entry

  u300:
   - update defconfig

  ux500:
   - enable common wireless and sensor drivers in defconfig
   - more defconfig updates

  vexpress:
   - fix voltage calculation for opp
   - fix reboot hang and warning
   - fix out-of-bounds array access
   - improve error handling in clock driver

  overall:
   - always select CLKSRC_OF in multiplatform builds

  And these are the devicetree related changes:

  imx:
   - add missing #clock-cell properties
   - fix pinctrl setting in imx6sl-evk
   - fix video endpoint on imx53
   - remove obsolete lvds-channel nodes (multiple patches)
   - add missing second stmpe node
   - fix usb host mode on dmo-edmqmx6 (multiple patches)
   - fix gic node #address-cells to match usage
   - add missing legacy IRQ map for PCIe
   - fix microsom pincontrol setting for rgmii
   - fix fatal typo in touchscreen DT usage for mx5
   - list all RAM present on m53evk and mx53qsb

  omap:
   - fix bug in DT handling of gpmc external bus
   - add DT for older revision of beagleboard
   - fix regression after DT node name fixes
   - remove obsolete properties for gpmc
   - fix pinmux comment to match DT it refers to
   - fix newly added dra7xx clock node data
   - add missing clock for USB PHY

  mvebu:
   - add missing clock for mdio node
   - fix nonstandard vendor prefixes on i2c nodes

  rockchip:
   - fix pin control setting for uart

  shmobile:
   - fix typo in DT data for pin control (multiple patches)
   - fix gic node #address-cells to match usage

  tegra:
   - fix clock and uart DT representation to match hardware

  zynq:
   - add DT nodes for newly added driver
   - add DT properties required for cpufreq-ondemand

  overall:
   - restore alphabetic order in Makefile
   - grammar fixes in bindings"

* tag 'fixes-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (66 commits)
  ARM: vexpress/TC2: Convert OPP voltage to uV before storing
  power/reset: vexpress: Fix restart/power off operation
  dt: tegra: remove non-existent clock IDs
  clk: tegra: remove non-existent clocks
  ARM: tegra: remove UART5/UARTE from tegra124.dtsi
  ARM: tegra: remove TEGRA_EMC_SCALING_ENABLE
  ARM: Tidy up DTB Makefile entries
  ARM: fix missing CLKSRC_OF on multi-platform
  ARM: spear: add __init to spear_clocksource_init()
  ARM: pxa: hx4700.h: include "irqs.h" for PXA_NR_BUILTIN_GPIO
  arm/mach-vexpress: array accessed out of bounds
  clk: vexpress: NULL dereference on error path
  ARM: OMAP2+: Fix GPMC remap for devices using an offset
  ARM: zynq: dt: Add I2C nodes to Zynq device tree
  ARM: zynq: DT: Add 'clock-latency' property
  ARM: OMAP2+: Fix oops for GPMC free
  ARM: dts: Add support for the BeagleBoard xM A/B
  ARM: dts: Grammar /that will/it will/
  ARM: dts: Grammar /is uses/ is used/
  ARM: OMAP2+: Fix config name for USB3 PHY
  ...
2014-04-25 13:02:02 -07:00
Linus Torvalds 625bba662c File locking related bugfixes for v3.15 (pile #2)
- fix for a long-standing bug in __break_lease that can cause soft lockups
 - renaming of file-private locks to "open file description" locks, and the
   command macros to more visually distinct names.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTWB/iAAoJEAAOaEEZVoIV2tUP/A1c9YUmgt+LdOJIA2k3Uh9C
 nNdZss2hj8s91qCRe1Mb7L9UjzTEEiYILYqmXMRW9yUpPI7Oxr5sjqZEqlK5lTso
 447QEow93wSE/WIKwwzdbKS+CMRNvIba6EjzQ7h0kU3ExMnFMXwD2QK7eGT2pEko
 kaQMq5BbxxIaTYmp/tKioacBPbpO3TQpS6ZWv2kZDCk4l1wCdsBNL7h3eqM63L/L
 A05zA88e3//wxVSPLA5JpQJ5fYkZrz7sqZYd+H80VXn34YQY7/7Kq16fiCprhntq
 tZb9LWOIJmSruN7r39KJgf43++fpSrv5XPfqsL4TDdwGcYwBAznhItrfOUC0Ja1+
 ZY227gHbxBwSeN9jj3zc4peOpzNPdIMnw0CEZVGn/AgssFFh/Ja8PrIQCxjI5djP
 eLqiiBBznt9HaZWPslWxaKqhdINFyuMp9LbEJ71nXwLQVYY32rOS828FAna982F3
 i0A48tPbrGpA1elGnVcsiAmJtAbZA9X6Y5M+gQGU2vWgX5GxiLeXOmEd+kVOaTmu
 2WVlwvEc3jTlxg9naGAKsfXwaOKqEIPJDoahWTpSRtNOntNwiPjg0cW80abq+Ybx
 WaPFhDLyd7290QyOASjyC4TwXMA2XvtQMQ8P+SMWkc2ZscjtuMBfEK9TBalg8tZV
 vHNrZpqnftIX7u6Y/fuT
 =rrtj
 -----END PGP SIGNATURE-----

Merge tag 'locks-v3.15-2' of git://git.samba.org/jlayton/linux

Pull file locking fixes from Jeff Layton:
 "File locking related bugfixes for v3.15 (pile #2)

   - fix for a long-standing bug in __break_lease that can cause soft
     lockups
   - renaming of file-private locks to "open file description" locks,
     and the command macros to more visually distinct names

  The fix for __break_lease is also in the pile of patches for which
  Bruce sent a pull request, but I assume that your merge procedure will
  handle that correctly.

  For the other patches, I don't like the fact that we need to rename
  this stuff at this late stage, but it should be settled now
  (hopefully)"

* tag 'locks-v3.15-2' of git://git.samba.org/jlayton/linux:
  locks: rename FL_FILE_PVT and IS_FILE_PVT to use "*_OFDLCK" instead
  locks: rename file-private locks to "open file description locks"
  locks: allow __break_lease to sleep even when break_time is 0
2014-04-25 12:40:32 -07:00
Christian Borntraeger 0c8c77d355 s390/ccwgroup: Fix memory corruption
commit 0b60f9ead5 (s390: use
device_remove_file_self() instead of device_schedule_callback())

caused random memory corruption on my s390 box. Turns out that the
last element of the ccwgroup structure is of dynamic size, so we
must move the newly introduced work structure _before_ the zero
length array.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
CC: Tejun Heo <tj@kernel.org>
CC: Martin Schwidefsky <schwidefsky@de.ibm.com>
CC: Heiko Carstens <heiko.carstens@de.ibm.com>
CC: Sebastian Ott <sebott@linux.vnet.ibm.com>
CC: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 12:25:14 -07:00
Chanho Min bc3ee18a7a arm64: init: Move of_clk_init to time_init
Clock providers should be initialized before clocksource_of_init.
If not, Clock source initialization can be fail to get the clock.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-04-25 18:15:56 +01:00
Leo Yan 8f0712037b arm64: initialize spinlock for init_mm's context
ARM64 has defined the spinlock for init_mm's context, so need initialize
the spinlock structure; otherwise during the suspend flow it will dump
the info for spinlock's bad magic warning as below:

[   39.084394] Disabling non-boot CPUs ...
[   39.092871] BUG: spinlock bad magic on CPU#1, swapper/1/0
[   39.092896]  lock: init_mm+0x338/0x3e0, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[   39.092907] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G           O 3.10.33 #125
[   39.092912] Call trace:
[   39.092927] [<ffffffc000087e64>] dump_backtrace+0x0/0x16c
[   39.092934] [<ffffffc000087fe0>] show_stack+0x10/0x1c
[   39.092947] [<ffffffc000765334>] dump_stack+0x1c/0x28
[   39.092953] [<ffffffc0007653b8>] spin_dump+0x78/0x88
[   39.092960] [<ffffffc0007653ec>] spin_bug+0x24/0x34
[   39.092971] [<ffffffc000300a28>] do_raw_spin_lock+0x98/0x17c
[   39.092979] [<ffffffc00076cf08>] _raw_spin_lock_irqsave+0x4c/0x60
[   39.092990] [<ffffffc000094044>] set_mm_context+0x1c/0x6c
[   39.092996] [<ffffffc0000941c8>] __new_context+0x94/0x10c
[   39.093007] [<ffffffc0000d63d4>] idle_task_exit+0x104/0x1b0
[   39.093014] [<ffffffc00008d91c>] cpu_die+0x14/0x74
[   39.093021] [<ffffffc000084f74>] arch_cpu_idle_dead+0x8/0x14
[   39.093030] [<ffffffc0000e7f18>] cpu_startup_entry+0x1ec/0x258
[   39.093036] [<ffffffc00008d810>] secondary_start_kernel+0x114/0x124

Signed-off-by: Leo Yan <leoy@marvell.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-04-25 16:46:51 +01:00
Will Deacon 43683afbcb arm64: debug: remove noisy, pointless warning
Sending a SIGTRAP to a user task after execution of a BRK instruction at
EL0 is fundamental to the way in which software breakpoints work and
doesn't deserve a warning to be logged in dmesg. Whilst the warning can
be justified from EL1, do_debug_exception will already do the right thing,
so simply remove the code altogether.

Cc: Sandeepa Prabhu <sandeepa.prabhu@linaro.org>
Reported-by: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-04-25 16:46:50 +01:00
Steve Capper 2eb835e058 arm64: mm: Add THP TLB entries to general mmu_gather
When arm64 moved over to the core mmu_gather, it lost the logic to
flush THP TLB entries (tlb_remove_pmd_tlb_entry was removed and the
core implementation only signals that the mmu_gather needs a flush).

This patch ensures that tlb_add_flush is called for THP TLB entries.

Signed-off-by: Steve Capper <steve.capper@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-04-25 16:46:49 +01:00
Martin Schwidefsky 6e0de81759 s390/bpf,jit: initialize A register if 1st insn is BPF_S_LDX_B_MSH
The A register needs to be initialized to zero in the prolog if the
first instruction of the BPF program is BPF_S_LDX_B_MSH to prevent
leaking the content of %r5 to user space.

Cc: <stable@vger.kernel.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-04-25 14:03:25 +02:00
Sebastian Hesselbarth d93003e8e4 ARM: 8042/1: iwmmxt: allow to build iWMMXt on Marvell PJ4B
Some Marvell PJ4B CPUs also implement iWMMXt extensions. With a
proper check for iWMMXt coprocessors now in place, enable it by
default on PJ4B. While at it, also allow to manually select
the corresponding Kconfig option.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-25 12:07:35 +01:00
Sebastian Hesselbarth cd1711709f ARM: 8041/1: pj4: fix cpu_is_pj4 check
Commit fdb487f5c9
  ("ARM: 8015/1: Add cpu_is_pj4 to distinguish PJ4 because it
    has some differences with V7")
introduced a cpuid check for Marvell PJ4 processors to fix a
regression caused by adding PJ4 based Marvell Dove into
multi_v7.

Unfortunately, this check is too narrow to catch PJ4 used on
Dove itself and breaks iWMMXt support.

This patch therefore relaxes the cpuid mask to match both PJ4
and PJ4B. Also, rework the given comment about PJ4/PJ4B
modifications to be a little bit more specific about the
differences.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-25 12:07:34 +01:00
Sebastian Hesselbarth e89f443b18 ARM: 8040/1: pj4: properly detect existence of iWMMXt coprocessor
commit fdb487f5c9
  ("ARM: 8015/1: Add cpu_is_pj4 to distinguish PJ4 because it
    has some differences with V7")
introduced a fix for checking PJ4 cpuid to not use PJ4 specific
coprocessor access on non-PJ4 platforms.

Unfortunately, this in turn broke Marvell Armada 370/XP, both
comprising Marvell PJ4B CPUs without iWMMXt extension. Instead
of only checking for cpuid, which may not be sufficient to
determine iWMMXt support, the presence of iWMMXt coprocessors
can be checked by enabling and reading the Coprocessor ID
register (wCID, register 0 of CP1).

Therefore this adds an explicit check for the presence and correct
wCID value, before enabling iWMMXt capabilities. As a bonus, also
print the iWMMXt version of a detected coprocessor.

This has been tested to properly detect iWMMXt presence/absence on:
- PJ4,  CPUID 0x560f5815, wCID 0x56052001: Marvell Dove, iWMMXt v2
- PJ4B, CPUID 0x561f5811: Marvell Armada 370, no iWMMXt
- PJ4B, CPUID 0x562f5841, wCID 0x56052001: Marvell Armada 1500, iWMMXt v2
- PJ4B, CPUID 0x562f5842: Marvell Armada XP, no iWMMXt

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-25 12:07:34 +01:00
Sebastian Hesselbarth 7d06565989 ARM: 8039/1: pj4: enable iWMMXt only if CONFIG_IWMMXT is set
This fixes PJ4 coprocessor init to only expose iWMMXt capabilities,
if the corresponding kernel support for iWMMXt is enabled.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-25 12:07:33 +01:00
Sebastian Hesselbarth c2f07fe64d ARM: 8038/1: iwmmxt: explicitly check for supported architectures
iwmmxt.S requires special treatment of coprocessor access registers
for PJ4 and XScale-based CPUs. It only checks for CPU_PJ4 and drops
down to XScale-based treatment on all other architectures.

As some PJ4B also come with iWMMXt and also need PJ4 treatment,
rework the corresponding preprocessor directives to explicitly
check for supported architectures and fail on unsupported ones.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-25 12:07:32 +01:00
Arnd Bergmann 76e7745e8e arm: Xilinx Zynq DT fixes for v3.15
- Enable Zynq I2c
 - Fix cpufreq DT binding
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iEYEABECAAYFAlNaES4ACgkQykllyylKDCGvBwCdH1wccre+AnVhHgRkarMis01j
 4aYAnirmoFXI7Fd20+8DkAHZ6WvCOaNe
 =fb5F
 -----END PGP SIGNATURE-----

Merge tag 'zynq-dt-fixes-for-3.15' of git://git.xilinx.com/linux-xlnx into fixes

arm: Xilinx Zynq DT fixes for v3.15

- Enable Zynq I2c
- Fix cpufreq DT binding

* tag 'zynq-dt-fixes-for-3.15' of git://git.xilinx.com/linux-xlnx:
  ARM: zynq: dt: Add I2C nodes to Zynq device tree
  ARM: zynq: DT: Add 'clock-latency' property

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-25 11:22:20 +02:00
Arnd Bergmann 1fc52762e3 ARM Versatile Express fixes for 3.15
This series contains straight-forward fixes for different
 Versatile Express infrastructure drivers:
 
 - NULL pointer dereference on the error path in the clk driver
 - out of boundary array access in the dcscb driver
 - broken restart/power off implementation
 - mis-interpreted voltage unit in the spc driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJTWTroAAoJEL9jRaJfXa5PHMkIAJB2S6zuqIxn7qRsfeD5YauR
 nz7AHjDaakoVy6YTaMdHQI+dXSK6BPUNvMbrKzW3WWbT4ktJ/r3k/OeeBv/2T93L
 8KW1Bbif7kPfdfITwCCWDs5waTDVXSBC6AGGoXomzQIt4MqghhzoLRc6uvhnuYAL
 R7ZJsTWRa+47LVOJsghVffMyNlwCMj//prW7PBY6RIZXhpcbI+FGYv5Rm1XRITWn
 uL2cSulBmWeqMVCR/gFx8/K5TqZ90q835dD1Ggh+BeB1Vaifu9/cI3D8w0hl/xy9
 nRneKdTaTEpKjgwI3up4vMFbLbMI7brdMphZ9ZeGgK+YuWXFDbKvvdwjvDJ4Tx0=
 =BS4Q
 -----END PGP SIGNATURE-----

Merge tag 'vexpress/fixes-for-3.15' of git://git.linaro.org/people/pawel.moll/linux into fixes

ARM Versatile Express fixes for 3.15

This series contains straight-forward fixes for different
Versatile Express infrastructure drivers:

- NULL pointer dereference on the error path in the clk driver
- out of boundary array access in the dcscb driver
- broken restart/power off implementation
- mis-interpreted voltage unit in the spc driver

* tag 'vexpress/fixes-for-3.15' of git://git.linaro.org/people/pawel.moll/linux:
  ARM: vexpress/TC2: Convert OPP voltage to uV before storing
  power/reset: vexpress: Fix restart/power off operation
  arm/mach-vexpress: array accessed out of bounds
  clk: vexpress: NULL dereference on error path

Includes an update to 3.15-rc2

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 23:46:58 +02:00
Linus Torvalds ff1e5b447e spi: Fixes for v3.15
A few driver specific fixes here:
 
  - SH HSPI was dealing with its clocks incorrectly which meant it didn't
    work on some SoCs, fixing this also requires a small fix to one of
    the SoC clock trees to avoid breaking existing users.
  - The SiRF driver appears to have had several quality problems, it's
    fairly new and not widely used so this isn't too worrying.
  - A brute force fix for excessive locking in the Atmel driver, it needs
    further investigation but this deals with the immediate issue.
  - A build fix for the Blackfin driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTWPNeAAoJELSic+t+oim9VOYP/1s4R3EsLg/CoO6T3jqDqizZ
 0jnQgqTUi11q8+5ozLdt0zhmGOwmoTaqP3RhNqntwFyMucEWmBjrJcRlcmbfq5ve
 IWAArM++RvzCgUmK2DfnQ+KxvLNbdDzO6Q+DIzUb1lia5T64Ope3JBWUG2CT5YSE
 Yhi1qaktVWP57toZQmuidW+Q48d+fBxdzQ8VIfP1q2GqISwuabALjzp0I+oG5Sa1
 3yd0037WmIYXUM+dKMijPQjNtB4FLJ545RR+Y5s9RXn9Pq/KpLL2aVCaPbDW36Oz
 bK4zO80mS6zfurk9Yi7RiOV1uTCd/dg4G2MLTzrtP5LgdKpqthVElKbLJUv9cv0z
 gZ19wFM0tGe3raxUsXUlcxAyETiNPP+pm6QriS9rgrdazIiS0gP6tvpfU8Szxv3o
 EJMJEQ76ieuVA8LVLskPehNYTl5z4CiISS8SrBUdvV4P96RdyD4rGLdDJw5PDIEL
 GBEpdcg48QFt6twO52xAQEzRx0T98c/C0GGYR38CbRiNFFZCh5IAr0po1iwTY3WC
 vR/2YJw2Lf/+rf6Hu0cNuFd1csaTBQqh6x4JqVHdmL+xIqut2yhP3DLynK9+APR2
 6oIHameZGAY1s0iDpCbeEZoTJF0uJw4+qV3xpCDnSTwiBQoD8whwJUnrFyKb1Mo2
 +T5hNKls3vDpNwVPFueU
 =kM6u
 -----END PGP SIGNATURE-----

Merge tag 'spi-v3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few driver specific fixes here:

   - SH HSPI was dealing with its clocks incorrectly which meant it
     didn't work on some SoCs, fixing this also requires a small fix to
     one of the SoC clock trees to avoid breaking existing users.
   - The SiRF driver appears to have had several quality problems, it's
     fairly new and not widely used so this isn't too worrying.
   - A brute force fix for excessive locking in the Atmel driver, it
     needs further investigation but this deals with the immediate
     issue.
   - A build fix for the Blackfin driver"

* tag 'spi-v3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: atmel: Fix scheduling while atomic bug
  spi: sh-hspi: Do not specifically request shyway_clk clock
  ARM: shmobile: r8a7778: Use clks as MSTP007 parent
  spi: sirf: make GPIO chipselect function work well
  spi: sirf: set SPI controller in RISC IO chipselect mode
  spi: sirf: correct TXFIFO empty interrupt status bit
  spi: bfin5xx: fix build error
2014-04-24 12:01:05 -07:00
Linus Torvalds 92891ed6b1 Merge branch 'fixes_for_v3.15' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull dma-mapping fix from Marek Szyprowski:
 "A small fix for dma-mapping subsystem for ARM"

* 'fixes_for_v3.15' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  arm: dma-mapping: Fix mapping size value
2014-04-24 09:58:57 -07:00
Punit Agrawal cf2e0a73ca ARM: vexpress/TC2: Convert OPP voltage to uV before storing
The SPC stores voltage in mV while the code assumes it was returning
uV. Convert the returned voltage to uV before storing. Also fix the
comment depicting voltage to uV.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2014-04-24 17:20:50 +01:00
Stephen Warren 862f0eea38 ARM: tegra: remove UART5/UARTE from tegra124.dtsi
Tegra124 only has 4 UARTs. Parts of the documentation hint at a fifth
UART, but this appears to be left-over from earlier SoC documentation.
Remove the non-existent DT node for UART5.

Cc: <stable@vger.kernel.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:36:40 +02:00
Arnd Bergmann f126776a21 Fixes for omaps, mostly to fix some GPMC, DSS and USB issues for
device tree based booting. And turns out BeagleBoard xM A/B
 needs it's own minimal dts in addition to the related u-boot
 changes. Also few minor documentation and typo fixes are merged
 to get them out of the way.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTWAV8AAoJEBvUPslcq6Vz1+0P/3zagpaCsmh3rqr5u5jLYkS6
 UXqrfjQTScQ9SK4xlwHJzCEI8oA/VvgAhk9RetT3Nd8HX4HFM2T1cCyx0s+01n0L
 SrERzwVn1VxFaX4/xYSwVyt2GLdiltnCgzS2yQGjESN79aPTaKtJSbyhoah7GJQC
 RB+UnE1gpBpQIpjIRSrhIWGCPH4HlLyoAgSY/u3QjBmfbm6DqCsjOx7l7tFx04gR
 xQJ/EueWyQtEsmBjAQIIYJ3vZB14TI/HVAmdwsFMz4/eOcKoCtt+iGigZ0jFIP8w
 6XOfJu5s0Nn2hAJ26KxoX+SXN1DJefAYmnLRsBGgCueWkOpC7v0TgeQ2b0Wr7e//
 eaM5Rnv3xHWvXlv7zzNWOp3n96Mnm4WPNARCuS86Gc2PyvV3+SqK25WDy+HPSGQP
 e9RkGipHG2YKX5HLcq2l2O7pfftB+ZcDEfADuR/8chasDxqSd4zVxsGOsWzWk/fG
 2d9zZifnYeXDo/Tu6PqriXNPIBBD5TDHK5Df28EIvtVig5AqerApay2zBt9zXn/H
 Ux6Yfw06iVCr8okk8s55CYBhYUqQfg9LEZMJLRkXAplErLvGgt46rh2DD2SU7T61
 I4I40tuwRzEhCuIOlG5ztngkCpL+QnKC477sPx9KtQ4i3Rg6yKT8HZc0jSwhr0vB
 sZMVDWxsRJWBxnbZyaoL
 =co/l
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.15/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Fixes for omaps, mostly to fix some GPMC, DSS and USB issues for
device tree based booting. And turns out BeagleBoard xM A/B
needs it's own minimal dts in addition to the related u-boot
changes. Also few minor documentation and typo fixes are merged
to get them out of the way.

* tag 'omap-for-v3.15/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix GPMC remap for devices using an offset
  ARM: OMAP2+: Fix oops for GPMC free
  ARM: dts: Add support for the BeagleBoard xM A/B
  ARM: dts: Grammar /that will/it will/
  ARM: dts: Grammar /is uses/ is used/
  ARM: OMAP2+: Fix config name for USB3 PHY
  ARM: dts: am335x: update USB DT references
  ARM: dts: OMAP2+: remove uses of obsolete gpmc,device-nand
  ARM: AM335X: EVM: fix pinmux documentation in devicetree
  ARM: OMAP2+: N900: remove omapdss init for DT boot
  ARM: dts: dra7xx-clocks: Correct mcasp2_ahclkx_mux bit-shift
  ARM: dts: omap5: Add clocks to USB3 PHY node
  ARM: OMAP2+: hwmod: fix missing braces in _init()
  ARM: AM43xx: fix dpll init in bypass mode
  ARM: OMAP3: hwmod data: Correct clock domains for USB modules
  ARM: OMAP3: PM: remove access to PRM_VOLTCTRL register

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:35:58 +02:00
Arnd Bergmann 072c8b3fe2 This is a patch set for some ST-Ericsson devices:
- Updates the Ux500 (U8500) defconfig
 - Selects PARTITION_ADVANCED for Ux500 and U300
 - Configure in IIO sensor drivers for the Ux500
 - Configure in the CW1200 WLAN chip for the Ux500
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTS6ZhAAoJEEEQszewGV1zyokQAJWRYpC5T3uSDOSw/nenLwa2
 5DusWzEDvz7Bip6UxVif1SIvEaPs1gHMnhSquwlDfyVPM1SygvxvsZCD4daKEGru
 zsvMSRAUTaG2tKxo7QeSwErSIdg+HQtJ0rhgHyzSYUajDjQ0QQ/qGc6vIcJ8PvDj
 4uMmc3F0dk7wqSgTXtnMBD/L8/YSqIuUHTAbAmA84s64jLCXicbubgqjv0XNX5IM
 Hzm6RP/HVFE6tcji6dUPZNM54lRrJ0/o6Fg7G3l10JehAgSlUpR7weH+jtm01Cjc
 lkdGl3buOn0ZE6mcJO7GAPlZySzhljNoL7rn8M2APr1MR5v3FLRN6mzVEoTGJBMJ
 EufQlh0tAPuy6vnGroW+pzDZTSyhSXMcT38hnRW50hYRGrOH1B16n2NKLoiw/4X4
 kcxOsPMK1+4RLs0+LbWzCrCJVxBzTsrzFc/z10SLfoePEZPuC0UUczx88GRR02eZ
 gAyO7FtCXvNDbQCh1fv2at0/17yvP3hcNQmC5MruRCJ55HTiUlwkDBbD7GS5bWG9
 pYV+bWENJy7bY4nccXP8XqzIpxqkJ1nO917PycWhvGHFJFFp0dLFbje9ejqFCjY5
 kyBZGRQ8lqN7qTdESbiameazStJCSmZbH+lCDf9uFy3ram30vasmkqlSaEfFDSZA
 PX32S9J2WQgrRq2W60oR
 =Xe+n
 -----END PGP SIGNATURE-----

Merge tag 'ux500-defconfig-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into fixes

This is a patch set for some ST-Ericsson devices:
- Updates the Ux500 (U8500) defconfig
- Selects PARTITION_ADVANCED for Ux500 and U300
- Configure in IIO sensor drivers for the Ux500
- Configure in the CW1200 WLAN chip for the Ux500

* tag 'ux500-defconfig-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: configure for CW1200 WLAN chip
  ARM: ux500: configure in sensors
  ARM: u300: u300_defconfig: Enable PARTITION_ADVANCED
  ARM: ux500: u8500_defconfig: Enable PARTITION_ADVANCED
  ARM: ux500: update defconfig

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:35:14 +02:00
Arnd Bergmann 6e1ae422c3 Renesas ARM Based SoC Fixes Updates for v3.15
r8a7791 (R-Car M2) based koelsch board
 * Correct renesas,gpios to renesas,groups in sd[012] pfc
 
 8a7790 (R-Car H2) based lager board
 * Correct SND_SOC_DAIFMT_CBx_CFx flags
 
 r8a7740 (R-Mobile A1) SoC
 * Drop address cells from GIC node
 
 r8a7740 (R-Mobile A1) based Armadillo800 EVA board
 * Correct SND_SOC_DAIFMT_CBx_CFx flags
 
 sh73a0 (SH-Mobile AG5) SoC
 * Drop address cells from GIC node
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJTTx5UAAoJENfPZGlqN0++iCIP/AmwtzYsCtUY2oVnjC1eSy8Y
 /xZxIgQskw00In1bUUAjv+6OAgmj+P3njjeFCItWP3QOc41QBaQ32l5FLPfNxK1T
 p4r5m+H8jlgEVZlSaIeUp37xA5DlcGE04TIRhZzp969wMJkRb9SOxhlkqoOao1qJ
 SRN4z8HgTI0sYCRgTmBSjZJC/srBSO08NAmEjB2i3DNFhJWRQP7BTl/SjwgGZKST
 8H6GQoHDZDf5GHsUigZVOMpiLgoa2TXsQzAC+JbULLreH8p/ybbzSco1qd2GqqhS
 rgSBs2uPSKhgyoz1pxi/oe6uNMoB/wbovE26itxD3bT7lTA8e1pZgf+bVyNBCu9D
 lWGVBjf+v4dBKCmCZmtthw29kfxPjQuVKoGCC8SBB/bnQnFrwADr23QWJ2p1g0P+
 EPg4umci4Dm+QV814w/M2IVRU6QIyX2Y4xalrBD3EhjoqY3tERClg67tbW54CDTE
 MyD8QPUpBbJElkcBOBOkP7SabqrjnIq4BdLaJQnkX2UfOcRQVTigMkM+tLwzm/l0
 rARyXVUBRPHLpkuEOHuSwNW+RuoAFbY2GuBwu4Esg1xXOUlYuO9SqXkdHD5x2ccq
 iQP3dZ8lE3ftZ+Z+QdEBzMqzXVBXply07G42FC7WjO0aYiNZ18FnVDNVh/728Kcf
 BSHdtoYqKt0qtECkIoPj
 =x27x
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Renesas ARM Based SoC Fixes Updates for v3.15

r8a7791 (R-Car M2) based koelsch board
* Correct renesas,gpios to renesas,groups in sd[012] pfc

8a7790 (R-Car H2) based lager board
* Correct SND_SOC_DAIFMT_CBx_CFx flags

r8a7740 (R-Mobile A1) SoC
* Drop address cells from GIC node

r8a7740 (R-Mobile A1) based Armadillo800 EVA board
* Correct SND_SOC_DAIFMT_CBx_CFx flags

sh73a0 (SH-Mobile AG5) SoC
* Drop address cells from GIC node

* tag 'renesas-fixes-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: koelsch: correct renesas,gpios to renesas,groups in sd[012] pfc
  ARM: shmobile: r8a7740: drop address cells from GIC node
  ARM: shmobile: sh73a0: drop address cells from GIC node
  ARM: shmobile: armadillo800eva: fixup SND_SOC_DAIFMT_CBx_CFx flags
  ARM: shmobile: lager: fixup SND_SOC_DAIFMT_CBx_CFx flags

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:34:34 +02:00
Arnd Bergmann 8a52a116d1 Fifth Round of Renesas ARM Based SoC DT Updates for v3.15
Correct renesas,groups in SDHI nodes of for r8a7790 (R-Car H2) based
 Lager board.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTS11TAAoJENfPZGlqN0++Aj8P/0pnafIdmAWgbowAKWiqMc6d
 xWe41o1hOvlq7YI9CjrGWNLtSRfBB3L5ckF/tA68Ra20RS/IlzicpiMWfjbyCtlV
 ZpCOHvLNyc9a6qQ73K3932Fgv0dFolyxJpx29kKNV7Qt+PKiiaBnelwQsA3a66YU
 HLlBpDMkYfP+/Qz1tQ8Jy6jGLjDn+sP2Do4oXWe84zLrf1x7hZxVcMc56KOCnpNt
 Uj0qHRvo5mAmL4OvdQuS4qIpL0FDBOkSetwxhdq8Bn0Fp4w3ioD/Os7axcMscVKS
 2CROkfR5mWbVf2z2IXwZ89RPVYW9c/kPzlXh9ak03Y3dPGoos3NqKu4oOQqAd+IK
 pQs3TO2Aqi31CC/g8jPygIKNMyyudmMhUDd2YIhDQRYZLa6Vh1DyzuDwaFL4Sv7D
 1ouGzYj+yq1sUDzVSXXHS0mJEcAC0yS3DUAvT8LO8LAgiVb7h7DlcQ03eO7uc2k/
 1LGAHNp3d/AW8v34oru8tVFpCFMZeHiTLIzY16B2IMggtijnuL1kLk5cLoj6KnhT
 cYthsw+f0fbaxB4MDUa6bTQj3U9pL1VS+2MpIrUjiTR45IKbsSn+UMqyTzQlQttN
 KB68yVHd/3CJsN39e4rrkBkagdFZJHSGHlYyA+ThNllgczdcvkVR7h97r0Tz8E39
 mADRC9jDGsGKl05qxS/0
 =ANme
 -----END PGP SIGNATURE-----

Merge tag 'renesas-dt5-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Fifth Round of Renesas ARM Based SoC DT Updates for v3.15

Correct renesas,groups in SDHI nodes of for r8a7790 (R-Car H2) based
Lager board.

* tag 'renesas-dt5-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: lager: correct renesas,gpios to renesas,groups in sd[02] pfc

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:34:00 +02:00
Arnd Bergmann 59209c9a34 Fixing uart-rx pull settings and a copy'n'paste error in a smp message
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCAAGBQJTTPmsAAoJEPOmecmc0R2BiGgIAIY5YgfTSzKn7Khmko/gtStC
 s3LUiCB3u9exlLLsP41IZYm+TvQ2f+qBHNmANmK3JE48xf0CDFjzRdA8l2epHQj5
 eWcBBnaFH3r9kIijK9af2wnC6EerzPKHejaQqizN7lMMLZlr9YHSZvSp+d8mOZ5A
 jMkWvFnhoht5H2+hj0EHv1S6mdzLM9sYwsegvtEv5mAvtvO7++1WFx1aauteat9a
 4jhgYE+ZPc31yER9bO+j4VQBc10tuwvmUP5LBfgpMMVP2efFzZqY1g5ElAtw5ApN
 HUoCRAsnd29tE5W8pjkFsi6kPlRh5uMmCRnzWudccGgU8MO3nmPbsFQtMj1gGM8=
 =TAVy
 -----END PGP SIGNATURE-----

Merge tag 'v3.15-rockchip-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes

Fixing uart-rx pull settings and a copy'n'paste error in a smp message

* tag 'v3.15-rockchip-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: rockchip: fix copy'n'paste error in smp error messages
  ARM: rockchip: rk3188: enable pull-ups on UART RX pins

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:33:31 +02:00
Arnd Bergmann 9dbb7e2451 The i.MX fixes for 3.15:
- A couple of dts changes for the fallout of imx-drm binding update
  - Parent DI clocks to video PLL for better HDMI support
  - PCIe interrupt mapping and GIC node fixes
  - A series of edmqmx6 board fixes
  - Other small and random fixes on imx5 and imx6 dts
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJTTOc9AAoJEFBXWFqHsHzO+S0H+wbYC7IJxwJ8YVRHChFAs6gV
 vUP3MICQV49PUReGxhsc0iJmjnc8fJtXDR4wH7rmzlxQYdrYsnFYBk+yPXO6GhqW
 Js4hkS4V/9CbGmL7v53eGhW9TyTq0yE+vWpKXZTyDoCbKKkfhKrtfRIjZgkdNBZD
 3XAZ4zm3LFwca/GwLN2RSjJ6mdPX24pm+SDnblHqDvz/3KyfBQj2AYUYjRxElide
 YcsUMcXU+/aJD1JTVdriw9lsP7sqJzsemj948j8XakBoU32A+DuoBuB0Dhm9Uv10
 2qydt1R5pR9q2iX1/FYzZyTjs+KOW3ds8/Z36+MbWTytYS9TwzQ6bln0nOCUNhw=
 =eymy
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes

The i.MX fixes for 3.15:
 - A couple of dts changes for the fallout of imx-drm binding update
 - Parent DI clocks to video PLL for better HDMI support
 - PCIe interrupt mapping and GIC node fixes
 - A series of edmqmx6 board fixes
 - Other small and random fixes on imx5 and imx6 dts

* tag 'imx-fixes-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: i.MX6: ipu_di_sel clocks can set parent rates
  ARM: imx6q: clk: Parent DI clocks to video PLL via di_pre_sel
  ARM: dts: imx: add required #clock-cells for fixed-clock
  ARM: dts: vybrid: drop address and size cells from GIC node
  ARM: dts: imx6sl-evk: Add an entry for MX6SL_PAD_ECSPI1_SS0__GPIO4_IO11
  ARM: dts: imx53: fix apparent copy/paste error
  ARM: dts: imx6q-gw5xxx: remove dead 'crtcs' property
  ARM: dts: imx53-tx53: add IPU DI ports and endpoints
  ARM: dts: imx6: edmqmx6: add second STMPE
  ARM: dts: imx6: edmqmx6: USB H1 only supports host mode
  ARM: dts: imx6: edmqmx6: Do not use the OTG switch as VBUS regulator
  ARM: dts: imx6: edmqmx6: Fix usbotg id pin
  ARM: dt: microsom: don't set bit 7 for ethernet mux settings
  ARM: imx6q-clk: parent lvds_gate from lvds_sel
  ARM: dts: imx: drop invalid size and address cells properties
  ARM: dts: mx5: fix wrong stmpe-ts bindings
  ARM: dts: imx53-m53evk: Fix memory region description
  ARM: dts: imx53-qsb-common: Fix memory region description
  ARM: dts: imx6: add PCIe interrupt mapping properties

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:30:53 +02:00
Arnd Bergmann 191bcd8120 mvebu DT fixes-non-critical (for v3.15-rc1)
- kirkwood
     - add some missing vendor prefixes to keep checkpatch happy
 
  - mvebu
     - add clock ref to mdio node on 370/XP/38x
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTRp87AAoJEP45WPkGe8ZnQMsP/i34LwsfOeNGtWeZnkPK4Jx1
 jp0RJrlzs2vGJyPrWAhkR+rSAwBVS5BzPTlRmJmuU/r+g6nnYB114dPk4mcGFB3W
 oLATGzJ1To2p5oxODYC0pYTiWZGa2bPt1IOSyN3p77IX7iGjqx2uCuGHGK3eNez3
 hqi8gHy2J6JCHMW60UhP2gBwUNgpOXHaekLdaRdj1zX66d14P4yLGVS2f8YjBTqd
 5L/0/P7SFHsZVFl6F24mWLE6PLSoQHpRsXx0T+N5AJTuFUHBiBHrXL5XiOduWLb4
 AdG//fu39zjbV9pnanktzrb7Y4qFTUXhl0YlvIedx4O3itVtfuvLGnvx9S79yapz
 lb22vjWU3Y1/IkgVSiAD1YdWvFbMJpbFVC1TxTR8mT/23E+bgSJhNOwkLznF7KA3
 +MgZjx0MolRkhPo7eVOVlyc+c4r4+GrU2UjKPImt5imPFtcnAWQIGVScIigURiLF
 OcxJnwAV7qPlQvYHASHcv7Lfrb5kBaxwGNEvn8QzqWPuMjX0owgvXlkf9LotlbTV
 T9PQOGHfBH9Jpyo4aU75hDuhsMpm4zK2cIV3R0E7lLVXUaoth9GgSmUJcaA/GiZa
 likX0g9mNBJdEel4e3WhjHmt6kfbbxhPSB8RJOoEeCx5AY6gUyFQuR0RLaKu+C6A
 1hs/KWDko00WsnWKiOxP
 =cOq9
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt-fixes-non-crit-3.15' of git://git.infradead.org/linux-mvebu into fixes

mvebu DT fixes-non-critical (for v3.15-rc1)

 - kirkwood
    - add some missing vendor prefixes to keep checkpatch happy

 - mvebu
    - add clock ref to mdio node on 370/XP/38x

* tag 'mvebu-dt-fixes-non-crit-3.15' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: ensure the mdio node has a clock reference on Armada 38x
  ARM: mvebu: ensure the mdio node has a clock reference on Armada 370/XP
  ARM: Kirkwood: DT: Add missing vendor prefix
  ARM: Kirkwood: Fix Atmel vendor prefix

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:30:16 +02:00
Paul Bolle cab4d50389 ARM: tegra: remove TEGRA_EMC_SCALING_ENABLE
Commit a7cbe92cef ("ARM: tegra: remove tegra EMC scaling driver")
removed the only user of TEGRA_EMC_SCALING_ENABLE. Remove its Kconfig
entry too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:29:12 +02:00
Domenico Andreoli af81c08c28 ARM: Tidy up DTB Makefile entries
Few things were out of order:

- removed ARCH_BCM2835 duplicate
- shuffled ARCH_BCM_5301X, ARCH_U8500 and ARCH_U300 around so to keep the
  list sorted

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Signed-by: Domenico Andreoli <domenico.andreoli@linux.com>

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:28:47 +02:00
Rob Herring 6d0add405a ARM: fix missing CLKSRC_OF on multi-platform
In commit ddb902cc34 (ARM: centralize common multi-platform kconfig
options), CLKSRC_OF was removed from some platforms, but not added to
ARCH_MULTIPLATFORM. Fix this.

Reported-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:28:20 +02:00
Alex Elder 1be5f69216 ARM: spear: add __init to spear_clocksource_init()
I get a build warning because spear_clocksource_init() calls
clocksource_mmio_init(), but it doesn't have an __init annotation.
Fix that.

Signed-off-by: Alex Elder <elder@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:28:00 +02:00
Andrea Adami c02b50e90b ARM: pxa: hx4700.h: include "irqs.h" for PXA_NR_BUILTIN_GPIO
hx4700 needs the same fix as in
9705e74671
"ARM: pxa: fix various compilation problems"

Fix build errors. Initial one is:
/linux/arch/arm/mach-pxa/include/mach/hx4700.h:18:32: error:
 'PXA_NR_BUILTIN_GPIO' undeclared here (not in a function)
|  #define HX4700_ASIC3_GPIO_BASE PXA_NR_BUILTIN_GPIO

Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-04-24 15:26:39 +02:00
Heinrich Schuchardt bb6dd5757c arm/mach-vexpress: array accessed out of bounds
dcscb_allcpus_mask is an array of size 2.

The index variable cluster has to be checked against this limit
before accessing the array.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2014-04-24 11:41:12 +01:00
Stephane Eranian 9f7ff8931e perf/x86: Fix RAPL rdmsrl_safe() usage
This patch fixes a bug introduced by:

  2422365780 ("perf/x86/intel: Use rdmsrl_safe() when initializing RAPL PMU")

The rdmsrl_safe() function returns 0 on success.
The current code was failing to detect the RAPL PMU
on real hardware  (missing /sys/devices/power) because
the return value of rdmsrl_safe() was misinterpreted.

Signed-off-by: Stephane Eranian <eranian@google.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: Venkatesh Srinivas <venkateshs@google.com>
Cc: peterz@infradead.org
Cc: zheng.z.yan@intel.com
Link: http://lkml.kernel.org/r/20140423170418.GA12767@quad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-04-24 08:12:41 +02:00
Linus Torvalds db725c88c7 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
 "Various fixes and post-merge window updates.  Included here are:
   - ensure Kconfig things which should be sorted remain sorted
   - fix three big-endian bugs which crept in during the last merge
     window
   - add the renameat2 syscall
   - fix big.LITTLE switcher initialisation checks
   - fix kdump vmcore for LPAE kernels"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: add renameat2 syscall
  ARM: keep arch/arm/Kconfig and arch/arm/mm/Kconfig select entries sorted
  ARM: 8033/1: fix big endian __pv_phys_pfn_offset size related issue
  ARM: 8032/1: bL_switcher: fix validation check before its activation
  ARM: 8030/1: ARM : kdump : add arch_crash_save_vmcoreinfo
  ARM: 8027/1: fix do_div() bug in big-endian systems
  ARM: 8026/1: Fix emulation of multiply accumulate instructions
  ARM: 8024/1: Keep DEBUG_UART_{PHYS,VIRT} entries sorted
2014-04-23 16:48:56 -07:00
Tony Lindgren fb677ef70b ARM: OMAP2+: Fix GPMC remap for devices using an offset
At least the smc91x driver expects the device to be at 0x300
offset from bus base address. This does not work currently
for GPMC when booted in device tree mode as it attempts to
remap the the allocated GPMC partition to the address
configured by the device tree plus the device offset.

Note that this works just fine when booted with legacy mode.

Let's fix the issue by just ignoring any device specific
offset while remapping. And let's make sure the remap
address confirms to the GPMC 16MB minimum granularity
as listed in the TRM for GPMC_CONFIG7 BASEADDRESS bits.

Otherwise we can get something like this:

omap-gpmc 6e000000.gpmc: cannot remap GPMC CS 1 to 0x01000300

Cc: Pekon Gupta <pekon@ti.com>
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-23 11:09:22 -07:00
Ritesh Harjani 59f0f119e8 arm: dma-mapping: Fix mapping size value
68efd7d2fb("arm: dma-mapping: remove order parameter from
arm_iommu_create_mapping()") is causing kernel panic
because it wrongly sets the value of mapping->size:

Unable to handle kernel NULL pointer dereference at virtual
address 000000a0
pgd = e7a84000
[000000a0] *pgd=00000000
...
PC is at bitmap_clear+0x48/0xd0
LR is at __iommu_remove_mapping+0x130/0x164

Fix it by correcting mapping->size value.

Signed-off-by: Ritesh Harjani <ritesh.harjani@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2014-04-23 15:07:00 +02:00
Mark Brown 201f9e4dd5 Merge remote-tracking branches 'spi/fix/atmel', 'spi/fix/bfin5xx', 'spi/fix/hspi' and 'spi/fix/sirf' into spi-linus 2014-04-23 13:50:18 +01:00
Geert Uytterhoeven ae107d0613 dt: Fix binding typos in clock-names and interrupt-names
s/interrupts-names/interrupt-names/g
s/clocks-names/clock-names/g

Some of the binding files and device tree files get this wrong and the
kernel won't be able to pick it up. Fix them up now so that they don't
get widely used.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by : Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2014-04-23 13:03:57 +01:00
Miklos Szeredi 556d3f7f4d ARM: add renameat2 syscall
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
[dropped arch/arm/include/asm/unistd.h changes --rmk]
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-23 11:27:42 +01:00
Miklos Szeredi c46a98ab10 arm64: add renameat2 compat syscall
Wire up the renameat2 syscall for compat (AArch32) applications.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-04-23 10:22:33 +01:00
Russell King 51aaf81fae ARM: keep arch/arm/Kconfig and arch/arm/mm/Kconfig select entries sorted
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-23 09:31:10 +01:00
Greg Kroah-Hartman 8b425aa193 First found of IIO fixes for the 3.15 cycle.
* Fix the platform data support for the at91 adc driver.
 * A couple of related follow up patches get the support working again
   for at91sam9260 and at91sam9g45 as the earlier patch results in a device
   name change.
 * A default timer value in the at91 adc driver was bonkers.  Make it sane.
 * Fix incorrect reporting of the integration time for the cm32181 light sensor
 * Fix a missing break in the ad2s1200 driver which would have give a false
   error return.
 * Make sure buffer scan mask queries from userspace return 0/1 rather than
   a fairly random value depending on their implementation of test_bit
 * Fix leak of the i2c client and a null pointer dereference in the cm36651
   driver.
 * Fix a build warning on avr32 for the mxs-lradc (not exactly a critical
   combination - but the issue was real).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTSX1HAAoJEFSFNJnE9BaIGkoQAIotGana51TXPo9KYnQJaCYH
 +xBfaaXEaR69lARoXT8SDGzyXPCQNOEbVfsXRwrVQ4Wl8x2hP8n9YdUrAHzZ/8O/
 Wf8Z0jb81Q+KNJ+SMMgcy4kK5OU71EMMk5fbocPzD+WfQ+WlDr+My1F3yZ5UIvOM
 nOUF6QCcYA0MN7dopEVIqyP8HZhrxR1YUvgzqOmp1fteYL4gFCU006WPSI30GxEv
 fMM8MiWbbn9xjOsR7SBzaLEo0Hv3YC92zwSAuJxGClH/+9cKogWAaE/PiNUO3y6A
 +2D0KQnGRopKy4j/QCjdPZsTmYDBxQ9vMlUOtRlOf1XAVjL6pZu2EJ2/ereShLW6
 B4rev23tqgk9nyNk/Li4n+5krzvPqqOcbWNW1la769DkEt7LU+YU+hiShkDm1+0M
 6hwxPd6gQxg0QUjuusi1+B5JqweAv+mEcCsQ+ga6ZK61X9bNJ6c/4YF451rkNhc6
 mlC3ZqBvDALmNSVdCas0GOGHLaeWxfoT7E9G6p62h9uBVerqZ6epvlAUC6JOHotc
 /qz/D1VL1+ptPAawXiFSNOb8RMJogdBfjPB9bOlYQSSHV3eF0RVNK6FQiqvc4mFX
 or1pPG6lDLGm6g3NcDEjxEEVThevQpEwKmpM0TCEUMiIuxSHYN/M//P2PSeDvYwk
 9k8x3fJae7dWNsGIT92y
 =HMr3
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-3.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First found of IIO fixes for the 3.15 cycle.

* Fix the platform data support for the at91 adc driver.
* A couple of related follow up patches get the support working again
  for at91sam9260 and at91sam9g45 as the earlier patch results in a device
  name change.
* A default timer value in the at91 adc driver was bonkers.  Make it sane.
* Fix incorrect reporting of the integration time for the cm32181 light sensor
* Fix a missing break in the ad2s1200 driver which would have give a false
  error return.
* Make sure buffer scan mask queries from userspace return 0/1 rather than
  a fairly random value depending on their implementation of test_bit
* Fix leak of the i2c client and a null pointer dereference in the cm36651
  driver.
* Fix a build warning on avr32 for the mxs-lradc (not exactly a critical
  combination - but the issue was real).
2014-04-22 21:29:20 -07:00
Victor Kamensky e3892e9160 ARM: 8033/1: fix big endian __pv_phys_pfn_offset size related issue
Fix e26a9e00af 'ARM: Better
virt_to_page() handling' replaced __pv_phys_offset with
__pv_phys_pfn_offset. Also note that size of __pv_phys_offset
was quad but size of __pv_phys_pfn_offset is word. Instruction
that used to update __pv_phys_offset which address is in r6
had to update low word of __pv_phys_offset so it used #LOW_OFFSET
macro for store offset. Now when size of __pv_phys_pfn_offset is
word, no difference between little endian and big endian should
exist - i.e no offset should be used when __pv_phys_pfn_offset
is stored.

Note that for little endian image proposed change is noop,
since in little endian case #LOW_OFFSET is defined 0 anyway.

Reported-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-22 22:24:00 +01:00
Nicolas Pitre 4530e4b6a4 ARM: 8032/1: bL_switcher: fix validation check before its activation
The switcher should not depend on MAX_CLUSTER to determine ifit should
be activated or not. In a multiplatform kernel binary it is possible to
have dual-cluster and quad-cluster platforms configured in. In that case
MAX_CLUSTER which is a build time limit should be 4 and that shouldn't
prevent the switcher from working if the kernel is booted on a b.L
dual-cluster system.

In bL_switcher_halve_cpus() we already have a runtime validation check
to make sure we're dealing with only two clusters, so booting on a quad
cluster system will be caught and switcher activation aborted.

However, the b.L switcher must ensure the MCPM layer is initialized on
the booted hardware before doing anything.  The mcpm_is_available()
function is added to that effect.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Abhilash Kesavan <kesavan.abhilash@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-22 22:23:59 +01:00
Liu Hua 56b700fd6f ARM: 8030/1: ARM : kdump : add arch_crash_save_vmcoreinfo
For vmcore generated by LPAE enabled kernel, user space
utility such as crash needs additional infomation to
parse.

So this patch add arch_crash_save_vmcoreinfo as what PAE enabled
i386 linux does.

Cc: <stable@vger.kernel.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Liu Hua <sdu.liu@huawei.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-22 22:23:58 +01:00
Xiangyu Lu 80bb3ef109 ARM: 8027/1: fix do_div() bug in big-endian systems
In big-endian systems, "%1" get the most significant part of the value, cause the instruction to get the wrong result.

When viewing ftrace record in big-endian ARM systems, we found that
the timestamp errors:

swapper-0   [001] 1325.970000:   0:120:R ==> [001]    16:120:R events/1
events/1-16 [001] 1325.970000:   16:120:S ==> [001]    0:120:R swapper
swapper-0   [000] 1325.1000000:  0:120:R   + [000]    15:120:R events/0
swapper-0   [000] 1325.1000000:  0:120:R ==> [000]    15:120:R events/0
swapper-0   [000] 1326.030000:   0:120:R   + [000]  1150:120:R sshd
swapper-0   [000] 1326.030000:   0:120:R ==> [000]  1150:120:R sshd

When viewed ftrace records, it will call the do_div(n, base) function, which achieved arch/arm/include/asm/div64.h in. When n = 10000000, base = 1000000, in do_div(n, base) will execute "umull %Q0, %R0, %1, %Q2".

Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Cc: <stable@vger.kernel.org> # 2.6.20+
Signed-off-by: Alex Wu <wuquanming@huawei.com>
Signed-off-by: Xiangyu Lu <luxiangyu@huawei.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-22 22:23:57 +01:00
Hanjun Guo 40732b369a ARM64: Remove duplicated Kconfig entry for "kernel/power/Kconfig"
There is a duplicated Kconfig entry for "kernel/power/Kconfig"
in menu "Power management options" and "CPU Power Management",
remove the one from menu "CPU Power Management" suggested by
Viresh.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-04-22 18:06:13 +01:00
Miklos Szeredi 838977f017 arm64: __NR_compat_syscalls fix
This fixes commit 6290b53de0 (arm64: compat: Wire up new AArch32 syscalls)
which did not update __NR_compat_syscalls accordingly.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: <stable@vger.kernel.org> # 3.14+
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-04-22 17:42:04 +01:00
Linus Torvalds 39bfe90706 Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 vdso fix from Peter Anvin:
 "This is a single build fix for building with gold as opposed to GNU
  ld.  It got queued up separately and was expected to be pushed during
  the merge window, but it got left behind"

* 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, vdso: Make the vdso linker script compatible with Gold
2014-04-22 09:09:06 -07:00
Jeff Layton 0d3f7a2dd2 locks: rename file-private locks to "open file description locks"
File-private locks have been merged into Linux for v3.15, and *now*
people are commenting that the name and macro definitions for the new
file-private locks suck.

...and I can't even disagree. The names and command macros do suck.

We're going to have to live with these for a long time, so it's
important that we be happy with the names before we're stuck with them.
The consensus on the lists so far is that they should be rechristened as
"open file description locks".

The name isn't a big deal for the kernel, but the command macros are not
visually distinct enough from the traditional POSIX lock macros. The
glibc and documentation folks are recommending that we change them to
look like F_OFD_{GETLK|SETLK|SETLKW}. That lessens the chance that a
programmer will typo one of the commands wrong, and also makes it easier
to spot this difference when reading code.

This patch makes the following changes that I think are necessary before
v3.15 ships:

1) rename the command macros to their new names. These end up in the uapi
   headers and so are part of the external-facing API. It turns out that
   glibc doesn't actually use the fcntl.h uapi header, but it's hard to
   be sure that something else won't. Changing it now is safest.

2) make the the /proc/locks output display these as type "OFDLCK"

Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Stefan Metzmacher <metze@samba.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Frank Filz <ffilzlnx@mindspring.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2014-04-22 08:23:58 -04:00
Behan Webster 8f2dd677be x86: LLVMLinux: Wrap -mno-80387 with cc-option
Wrap -mno-80387 gcc options with cc-option so they don't break
clang.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Cc: torvalds@linux-foundation.org
Cc: dwmw2@infradead.org
Cc: pageexec@freemail.hu
Link: http://lkml.kernel.org/r/1398145227-25053-1-git-send-email-behanw@converseincode.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-04-22 11:41:16 +02:00
Soren Brinkmann 0f6faa3fc9 ARM: zynq: dt: Add I2C nodes to Zynq device tree
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-04-22 09:30:49 +02:00
Soren Brinkmann b2bf5d4848 ARM: zynq: DT: Add 'clock-latency' property
Specify the 'clock-latency' property to avoid certain cpufreq governors
from refusing to work with the following error:
  ondemand governor failed, too long transition latency of HW, fallback to performance governor

Reported-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Tested-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-04-22 09:30:49 +02:00
Tony Lindgren efe8072316 ARM: OMAP2+: Fix oops for GPMC free
If gpmc_cs_remap() fails we will get an error because we are calling
release_resource() on an uninitialized resource. Let's fix that by
checking the resource flags. And while at it, let's also make
gpmc_cs_delete_mem() use the res pointer that we already have to
avoid confusion.

Without this patch we can get the following error:

omap-gpmc 6e000000.gpmc: cannot remap GPMC CS 1 to 0x01000300
Unable to handle kernel NULL pointer dereference at virtual address 00000018
...
(gpmc_cs_free+0x94/0xc8)
(gpmc_probe_generic_child+0x178/0x1ec)
(gpmc_probe_dt+0x1bc/0x2cc)
(gpmc_probe+0x250/0x44c)
(platform_drv_probe+0x3c/0x6c)
(really_probe+0x74/0x208)
(driver_probe_device+0x34/0x50)
(bus_for_each_drv+0x60/0x8c)
(device_attach+0x80/0xa4)
(bus_probe_device+0x88/0xb0)
(device_add+0x320/0x450)
(of_platform_device_create_pdata+0x80/0x9c)
(of_platform_bus_create+0xd0/0x170)
(of_platform_bus_create+0x12c/0x170)
(of_platform_populate+0x60/0x98)
(pdata_quirks_init+0x30/0x48)
(customize_machine+0x20/0x48)
(do_one_initcall+0x2c/0x14c)
(do_basic_setup+0x98/0xd8)
(kernel_init_freeable+0x12c/0x1e0)
(kernel_init+0x8/0xf0)
(ret_from_fork+0x14/0x2c)
Code: e1a04000 e59f0070 eb195136 e5942010 (e5923018)

Cc: Pekon Gupta <pekon@ti.com>
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: tony Lindgren <tony@atomide.com>
2014-04-21 19:26:13 -07:00
Anton Ivanov 0565103d1a um: Memory corruption on startup
The reverse case of this race (you must msync before read) is
well known. This is the not so common one.

It can be triggered only on systems which do a lot of task
switching and only at UML startup. If you are starting 200+ UMLs
~ 0.5% will always die without this fix.

Signed-off-by: Anton Ivanov <antivano@cisco.com>
[rw: minor whitespace fixes]
Signed-off-by: Richard Weinberger <richard@nod.at>
2014-04-20 23:57:21 +02:00
Anton Ivanov 9fcb663be4 um: Missing pipe handling
UML does not handle sigpipe. As a result when running it under
expect or redirecting the IO from the console to an external program
it will crash if the program stops or exits.

Signed-off-by: Anton Ivanov <antivano@cisco.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2014-04-20 23:13:30 +02:00
Tristan Schmelcher 0d71832e30 uml: Simplify tempdir logic.
Inferring the mount hierarchy correctly from /proc/mounts is hard when MS_MOVE
may have been used, and the previous code did it wrongly. This change simplifies
the logic to only require that /dev/shm be _on_ tmpfs (which can be checked
trivially with statfs) rather than that it be a _mountpoint_ of tmpfs, since
there isn't a compelling reason to be that strict. We also now check for tmpfs
on whatever directory we ultimately use so that the user is better informed.

This change also moves the more standard TMPDIR environment variable check ahead
of the others.

Applies to 3.12.

Signed-off-by: Tristan Schmelcher <tschmelcher@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2014-04-20 23:10:44 +02:00
Linus Torvalds 6d4596905b Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Ingo Molnar:
 "This fixes the preemption-count imbalance crash reported by Owen
  Kibel"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mce: Fix CMCI preemption bugs
2014-04-19 10:41:43 -07:00
Linus Torvalds 8de3f7a705 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
 "Two kernel side fixes:

   - an Intel uncore PMU driver potential crash fix
   - a kprobes/perf-call-graph interaction fix"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel: Use rdmsrl_safe() when initializing RAPL PMU
  kprobes/x86: Fix page-fault handling logic
2014-04-19 10:40:11 -07:00
Robert Nelson ef78f3869c ARM: dts: Add support for the BeagleBoard xM A/B
BeagleBoard xM A/B has an inverted usb hub enable line vs the xM C

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
[tony@atomide.com: updated for missing bracket]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 16:50:23 -07:00
Tony Lindgren be2fa17a56 OMAP hwmod and clock fixes for v3.15-rc
A few OMAP hwmod and clock fixes for v3.15-rc.  Probably the most useful
 fix is the AM43xx DPLL patch.
 
 Basic build, boot, and PM test results are here:
 
 http://www.pwsan.com/omap/testlogs/prcm-fixes-a-v3.15-rc/20140411130021/
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTSFhFAAoJEMePsQ0LvSpLCR4P/3h/lC04pT5ZxR3XBapS3cr1
 9YWw6a6R97hUbGFe4PbodIvk5JeN9avj1QvWImxSXUipOG+57QRm3xdSy7MhbngL
 oGiotZHkqnpjo8EK0r+Dw9UfcDnxJtiWqwFkNp4oE5T5HG3Sj8a3SmX5YYuE0+Jc
 QAbMOz7qW10P0AexZTiM2dG5MmA8mg3mOJnFxOn1cTlVbNHgdjY3aJ4+mQWWFWPd
 ccp4hqNlMRcvuwQdseYzLW6ZZycRUd54SECWLrylCqgNz6UqD9n4EW0Jo9f3Y3y+
 sn7J8C0Ac6+6OpdsJ6O49uUo/lnrfplEJBeomSDwuzIRkN0rMbp9BVLiw2gEgwz+
 aboDa74zHpHdQKxbtaiLWKSzcSDM2Jv9Vj4RVkXlnSeS3XRMS0P2gxi9rhaK8ikR
 WyGNqH4AIKDP+tX2bdM6hHkhCNvRHs55wToasGhwrrIhZOFZBjnlPxO/NW1KoQHA
 uObvb9H5D094mfwGnrKQJNYxlboh0lDlaHLlycgKOW9kOsf4PbUI1/k827fmuc7X
 oF5K3be7QLfNtQ8hnZIU3kgmdDdQ3d4/YHhBCPbDleAX4oNYqp0MiDLxKHtYEg/O
 4Ecg14rM1DxfWkMKht20ITtVQ/kAjTEGn1F8cNO1kLLJntktsJPv8JhF6t6HYvgX
 ZvcHuvJTYMkzOnIMMRxs
 =TOEq
 -----END PGP SIGNATURE-----

Merge tag 'for-v3.15-rc/omap-fixes-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.15/fixes

OMAP hwmod and clock fixes for v3.15-rc

A few OMAP hwmod and clock fixes for v3.15-rc.  Probably the most useful
fix is the AM43xx DPLL patch.

Basic build, boot, and PM test results are here:

http://www.pwsan.com/omap/testlogs/prcm-fixes-a-v3.15-rc/20140411130021/
2014-04-18 16:46:53 -07:00
Tony Lindgren cdd705dddc Merge branch 'fixes-v3.15-rc1'; commit '390403fd79821bbd0c3a0d83307df2be87047b36' into omap-for-v3.15/fixes 2014-04-18 16:44:38 -07:00
Linus Torvalds ea2388f281 Merge branch 'akpm' (incoming from Andrew)
Merge misc fixes from Andrew Morton:
 "13 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  thp: close race between split and zap huge pages
  mm: fix new kernel-doc warning in filemap.c
  mm: fix CONFIG_DEBUG_VM_RB description
  mm: use paravirt friendly ops for NUMA hinting ptes
  mips: export flush_icache_range
  mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages()
  wait: explain the shadowing and type inconsistencies
  Shiraz has moved
  Documentation/vm/numa_memory_policy.txt: fix wrong document in numa_memory_policy.txt
  powerpc/mm: fix ".__node_distance" undefined
  kernel/watchdog.c:touch_softlockup_watchdog(): use raw_cpu_write()
  init/Kconfig: move the trusted keyring config option to general setup
  vmscan: reclaim_clean_pages_from_list() must use mod_zone_page_state()
2014-04-18 16:40:31 -07:00
Kees Cook 8229f1a044 mips: export flush_icache_range
The lkdtm module performs tests against executable memory ranges, so it
needs to flush the icache for proper behaviors.  Other architectures
already export this, so do the same for MIPS.

[akpm@linux-foundation.org: relocate export sites]
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Cc: John Crispin <blogic@openwrt.org>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-18 16:40:09 -07:00
Viresh Kumar 9cc236827f Shiraz has moved
shiraz.hashim@st.com email-id doesn't exist anymore as he has left the
company.  Replace ST's id with shiraz.linux.kernel@gmail.com.

It also updates .mailmap file to fix address for 'git shortlog'.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Shiraz Hashim <shiraz.linux.kernel@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-18 16:40:08 -07:00
Mike Qiu 12c743eb22 powerpc/mm: fix ".__node_distance" undefined
CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  ...
  Building modules, stage 2.
WARNING: 1 bad relocations
c0000000013d6a30 R_PPC64_ADDR64    uprobes_fetch_type_table
  WRAP    arch/powerpc/boot/zImage.pseries
  WRAP    arch/powerpc/boot/zImage.epapr
  MODPOST 1849 modules
ERROR: ".__node_distance" [drivers/block/nvme.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
make: *** Waiting for unfinished jobs....

The reason is symbol "__node_distance" not been exported in powerpc.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
Cc: Alistair Popple <alistair@popple.id.au>
Cc: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-18 16:40:08 -07:00
Geert Uytterhoeven b7ab524b93 ARM: dts: Grammar /that will/it will/
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 16:37:43 -07:00
Geert Uytterhoeven 5c5be9db53 ARM: dts: Grammar /is uses/ is used/
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 16:37:43 -07:00
Kishon Vijay Abraham I 4883fb2279 ARM: OMAP2+: Fix config name for USB3 PHY
commit a70143 (drivers: phy: usb3/pipe3: Adapt pipe3 driver to Generic PHY
Framework) moved phy-omap-usb3 driver in drivers/usb/phy to drivers/phy and
also renamed the file to phy-ti-pipe3. It also renamed the config from
OMAP_USB3 to TI_PIPE3 in Kconfig. However the config name was not changed in
omap2plus_defconfig. Fixed it here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 16:37:43 -07:00
Leigh Brown a2f8d6b303 ARM: dts: am335x: update USB DT references
In "ARM: dts: am33xx: correcting dt node unit address for usb", the
usb_ctrl_mod and cppi41dma nodes were updated with the correct register
addresses.  However, the dts files that reference these nodes were not
updated, and those devices are no longer being enabled.

This patch corrects the references for the affected dts files.

Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 16:37:43 -07:00
Johan Hovold 4b549bf8bb ARM: dts: OMAP2+: remove uses of obsolete gpmc,device-nand
Remove all remaining uses of gpmc,device-nand that have been added since
the property was removed by commit f40739faba ("ARM: dts: OMAP2+:
Simplify NAND support").

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 16:37:43 -07:00
Wolfram Sang 365c107dcb ARM: AM335X: EVM: fix pinmux documentation in devicetree
Wrong documentation in pinmux description can be especially confusing.
Keep it proper.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 16:37:43 -07:00
Sebastian Reichel 3348e28ddc ARM: OMAP2+: N900: remove omapdss init for DT boot
Do not try to initialize display for DT boot, since omapdss
is now initialized via Device Tree. Without this patch the
display subsystem does not properly come up.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 16:37:43 -07:00
Peter Ujfalusi 8c0b4fd89e ARM: dts: dra7xx-clocks: Correct mcasp2_ahclkx_mux bit-shift
The correct bit is 24 for AHCLKX.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 15:53:33 -07:00
Roger Quadros ada7657640 ARM: dts: omap5: Add clocks to USB3 PHY node
The USB3 PHY driver (ti-pipe3) was updated so that the relevant
clock phandles are expected in the DT node.
Provide the necessary clocks.

Reported-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-18 15:53:21 -07:00
Vineet Gupta 64ee9f32c3 ARC: Delete stale barrier.h
Commit 93ea02bb84 ("arch: Clean up asm/barrier.h implementations")
wired generic barrier.h for ARC, but failed to delete the existing file.

In 3.15, due to rcupdate.h updates, this causes a build breakage on ARC:

      CC      arch/arc/kernel/asm-offsets.s
    In file included from include/linux/sched.h:45:0,
                     from arch/arc/kernel/asm-offsets.c:9:
    include/linux/rculist.h: In function __list_add_rcu:
    include/linux/rculist.h:54:2: error: implicit declaration of function smp_store_release [-Werror=implicit-function-declaration]
      rcu_assign_pointer(list_next_rcu(prev), new);
      ^

Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-18 13:49:15 -07:00
Linus Torvalds 674366e90e PCI updates for v3.15:
Host bridge drivers
     - Fix OF interrupt mapping for DesignWare, R-Car, Tegra (Lucas Stach)
     - Fix DesignWare iATU programming (Mohit Kumar)
 
   Miscellaneous
     - Fix powerpc NULL dereference from list_for_each_entry() update (Mike Qiu)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTUUMAAAoJEFmIoMA60/r8OrUQAKXhI6kXjJ36sSHiioQBFxD9
 fgJXDHS8gA4UD7ZV0BKQeA6kDM2v9A80UWLA2yLt+BWr0+DEgljsnRNWZjsrzoEn
 JZantkukqKfdo6LseIwfFJM7LTWqP/q6enTMXIp9UjLxnBK+j0K7qU0+u/VjH0Ab
 O8wouFu1B8REJDL5TvSjiEXO6uDtFPAuHQ1oAs5EeT35ZV54f8gSGyyUxLh1Fk18
 qrD+ERN5VrVI5K2ENJwIOljAoaHMiseSZPFA8nQu/XMZ5N0dZuU2gXGFMt3yuZID
 jTzq88umyEEMcbo+QqAW+rcoljq3GExBnOu2SF+0dvDWlXewsZz0WNdnKkUh5HCi
 vnnwvkSB4bpnv+rtu0QQgOFoFDkQV+EYSy6dUEijtVTOijZ2ZxnzOO8/y4pocpnB
 +hKehz0qNVl/RE9WMbCQ+TAb4K7+uECcilIUqq581BnmYFrH3FarfcDaHdWySI4O
 AIs2RtgwtlZv1MBpejM4OS7REav2IUFj8CWsvRIIrsgfvKvl/1Rxg2eQE8KPFSdc
 pi72CNKNvThzgAvpWjb0F/Wz7+0aWO6Nm0flYCBvcIB472x9dAzhVpoiKMf2BAII
 S/uebuA7hCZtoGEWOSwtEBYm+i3UR07YCL2UFv8Pj523DaOeTFgSYp7YFFJV+WqO
 AosR0V0L8mr2HMBK0KhN
 =VgYj
 -----END PGP SIGNATURE-----

Merge tag 'pci-v3.15-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI updates from Bjorn Helgaas:
 "These are fixes for a powerpc NULL pointer dereference, an OF
  interrupt mapping issue on some of the new host bridges, and a
  DesignWare iATU issue.

  Host bridge drivers
   - Fix OF interrupt mapping for DesignWare, R-Car, Tegra (Lucas Stach)
   - Fix DesignWare iATU programming (Mohit Kumar)

  Miscellaneous
    - Fix powerpc NULL dereference from list_for_each_entry() update (Mike Qiu)"

* tag 'pci-v3.15-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: tegra: Use new OF interrupt mapping when possible
  PCI: rcar: Use new OF interrupt mapping when possible
  PCI: designware: Use new OF interrupt mapping when possible
  PCI: designware: Fix iATU programming for cfg1, io and mem viewport
  PCI: designware: Fix comment for setting number of lanes
  powerpc/PCI: Fix NULL dereference in sys_pciconfig_iobase() list traversal
2014-04-18 10:56:27 -07:00