1
0
Fork 0
Commit graph

97178 commits

Author SHA1 Message Date
James Hogan 2dca3725cb MIPS: KVM: Whitespace fixes in kvm_mips_callbacks
Fix whitespace in struct kvm_mips_callbacks function pointers.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:05:07 +02:00
James Hogan 0fae34f464 MIPS: KVM: Make kvm_mips_comparecount_{func,wakeup} static
The kvm_mips_comparecount_func() and kvm_mips_comparecount_wakeup()
functions are only used within arch/mips/kvm/kvm_mips.c, so make them
static.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:04:59 +02:00
James Hogan f74a8e224e MIPS: KVM: Add count frequency KVM register
Expose the KVM guest CP0_Count frequency to userland via a new
KVM_REG_MIPS_COUNT_HZ register accessible with the KVM_{GET,SET}_ONE_REG
ioctls.

When the frequency is altered the bias is adjusted such that the guest
CP0_Count doesn't jump discontinuously or lose any timer interrupts.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:02:54 +02:00
James Hogan f82393426a MIPS: KVM: Add master disable count interface
Expose two new virtual registers to userland via the
KVM_{GET,SET}_ONE_REG ioctls.

KVM_REG_MIPS_COUNT_CTL is for timer configuration fields and just
contains a master disable count bit. This can be used by userland to
freeze the timer in order to read a consistent state from the timer
count value and timer interrupt pending bit. This cannot be done with
the CP0_Cause.DC bit because the timer interrupt pending bit (TI) is
also in CP0_Cause so it would be impossible to stop the timer without
also risking a race with an hrtimer interrupt and having to explicitly
check whether an interrupt should have occurred.

When the timer is re-enabled it resumes without losing time, i.e. the
CP0_Count value jumps to what it would have been had the timer not been
disabled, which would also be impossible to do from userland with
CP0_Cause.DC. The timer interrupt also cannot be lost, i.e. if a timer
interrupt would have occurred had the timer not been disabled it is
queued when the timer is re-enabled.

This works by storing the nanosecond monotonic time when the master
disable is set, and using it for various operations instead of the
current monotonic time (e.g. when recalculating the bias when the
CP0_Count is set), until the master disable is cleared again, i.e. the
timer state is read/written as it would have been at that time. This
state is exposed to userland via the read-only KVM_REG_MIPS_COUNT_RESUME
virtual register so that userland can determine the exact time the
master disable took effect.

This should allow userland to atomically save the state of the timer,
and later restore it.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:02:45 +02:00
James Hogan eda3d33c68 MIPS: KVM: Override guest kernel timer frequency directly
The KVM_HOST_FREQ Kconfig symbol was used by KVM guest kernels to
override the timer frequency calculation to a value based on the host
frequency. Now that the KVM timer emulation is implemented independent
of the host timer frequency and defaults to 100MHz, adjust the working
of CONFIG_KVM_HOST_FREQ to match.

The Kconfig symbol now specifies the guest timer frequency directly, and
has been renamed accordingly to KVM_GUEST_TIMER_FREQ. It now defaults to
100MHz too and the help text is updated to make it clear that a zero
value will allow the normal timer frequency calculation to take place
(based on the emulated RTC).

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:02:23 +02:00
James Hogan e30492bbe9 MIPS: KVM: Rewrite count/compare timer emulation
Previously the emulation of the CPU timer was just enough to get a Linux
guest running but some shortcuts were taken:
 - The guest timer interrupt was hard coded to always happen every 10 ms
   rather than being timed to when CP0_Count would match CP0_Compare.
 - The guest's CP0_Count register was based on the host's CP0_Count
   register. This isn't very portable and fails on cores without a
   CP_Count register implemented such as Ingenic XBurst. It also meant
   that the guest's CP0_Cause.DC bit to disable the CP0_Count register
   took no effect.
 - The guest's CP0_Count register was emulated by just dividing the
   host's CP0_Count register by 4. This resulted in continuity problems
   when used as a clock source, since when the host CP0_Count overflows
   from 0x7fffffff to 0x80000000, the guest CP0_Count transitions
   discontinuously from 0x1fffffff to 0xe0000000.

Therefore rewrite & fix emulation of the guest timer based on the
monotonic kernel time (i.e. ktime_get()). Internally a 32-bit count_bias
value is added to the frequency scaled nanosecond monotonic time to get
the guest's CP0_Count. The frequency of the timer is initialised to
100MHz and cannot yet be changed, but a later patch will allow the
frequency to be configured via the KVM_{GET,SET}_ONE_REG ioctl
interface.

The timer can now be stopped via the CP0_Cause.DC bit (by the guest or
via the KVM_SET_ONE_REG ioctl interface), at which point the current
CP0_Count is stored and can be read directly. When it is restarted the
bias is recalculated such that the CP0_Count value is continuous.

Due to the nature of hrtimer interrupts any read of the guest's
CP0_Count register while it is running triggers a check for whether the
hrtimer has expired, so that the guest/userland cannot observe the
CP0_Count passing CP0_Compare without queuing a timer interrupt. This is
also taken advantage of when stopping the timer to ensure that a pending
timer interrupt is queued.

This replaces the implementation of:
 - Guest read of CP0_Count
 - Guest write of CP0_Count
 - Guest write of CP0_Compare
 - Guest write of CP0_Cause
 - Guest read of HWR 2 (CC) with RDHWR
 - Host read of CP0_Count via KVM_GET_ONE_REG ioctl interface
 - Host write of CP0_Count via KVM_SET_ONE_REG ioctl interface
 - Host write of CP0_Compare via KVM_SET_ONE_REG ioctl interface
 - Host write of CP0_Cause via KVM_SET_ONE_REG ioctl interface

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:01:48 +02:00
James Hogan 3a0ba77408 MIPS: KVM: Migrate hrtimer to follow VCPU
When a VCPU is scheduled in on a different CPU, refresh the hrtimer used
for emulating count/compare so that it gets migrated to the same CPU.

This should prevent a timer interrupt occurring on a different CPU to
where the guest it relates to is running, which would cause the guest
timer interrupt not to be delivered until after the next guest exit.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:01:33 +02:00
James Hogan c73c99b0df MIPS: KVM: Fix timer race modifying guest CP0_Cause
The hrtimer callback for guest timer timeouts sets the guest's
CP0_Cause.TI bit to indicate to the guest that a timer interrupt is
pending, however there is no mutual exclusion implemented to prevent
this occurring while the guest's CP0_Cause register is being
read-modify-written elsewhere.

When this occurs the setting of the CP0_Cause.TI bit is undone and the
guest misses the timer interrupt and doesn't reprogram the CP0_Compare
register for the next timeout. Currently another timer interrupt will be
triggered again in another 10ms anyway due to the way timers are
emulated, but after the MIPS timer emulation is fixed this would result
in Linux guest time standing still and the guest scheduler not being
invoked until the guest CP0_Count has looped around again, which at
100MHz takes just under 43 seconds.

Currently this is the only asynchronous modification of guest registers,
therefore it is fixed by adjusting the implementations of the
kvm_set_c0_guest_cause(), kvm_clear_c0_guest_cause(), and
kvm_change_c0_guest_cause() macros which are used for modifying the
guest CP0_Cause register to use ll/sc to ensure atomic modification.
This should work in both UP and SMP cases without requiring interrupts
to be disabled.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:01:25 +02:00
James Hogan 044f0f03ec MIPS: KVM: Deliver guest interrupts after local_irq_disable()
When about to run the guest, deliver guest interrupts after disabling
host interrupts. This should prevent an hrtimer interrupt from being
handled after delivering guest interrupts, and therefore not delivering
the guest timer interrupt until after the next guest exit.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:01:10 +02:00
James Hogan 16fd5c1de4 MIPS: KVM: Add CP0_HWREna KVM register access
Implement KVM_{GET,SET}_ONE_REG ioctl based access to the guest CP0
HWREna register. This is so that userland can save and restore its
value so that RDHWR instructions don't have to be emulated by the guest.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:01:03 +02:00
James Hogan 7767b7d2f7 MIPS: KVM: Add CP0_UserLocal KVM register access
Implement KVM_{GET,SET}_ONE_REG ioctl based access to the guest CP0
UserLocal register. This is so that userland can save and restore its
value.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:00:57 +02:00
James Hogan f8be02daca MIPS: KVM: Add CP0_Count/Compare KVM register access
Implement KVM_{GET,SET}_ONE_REG ioctl based access to the guest CP0
Count and Compare registers. These registers are special in that writing
to them has side effects (adjusting the time until the next timer
interrupt) and reading of Count depends on the time. Therefore add a
couple of callbacks so that different implementations (trap & emulate or
VZ) can implement them differently depending on what the hardware
provides.

The trap & emulate versions mostly duplicate what happens when a T&E
guest reads or writes these registers, so it inherits the same
limitations which can be fixed in later patches.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:00:44 +02:00
James Hogan 48a3c4e4cd MIPS: KVM: Move KVM_{GET,SET}_ONE_REG definitions into kvm_host.h
Move the KVM_{GET,SET}_ONE_REG MIPS register id definitions out of
kvm_mips.c to kvm_host.h so that they can be shared between multiple
source files. This allows register access to be indirected depending on
the underlying implementation (trap & emulate or VZ).

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:00:35 +02:00
James Hogan fb6df0cdf0 MIPS: KVM: Add CP0_EPC KVM register access
Contrary to the comment, the guest CP0_EPC register cannot be set via
kvm_regs, since it is distinct from the guest PC. Add the EPC register
to the KVM_{GET,SET}_ONE_REG ioctl interface.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:00:26 +02:00
James Hogan b5dfc6c106 MIPS: KVM: Use tlb_write_random
When MIPS KVM needs to write a TLB entry for the guest it reads the
CP0_Random register, uses it to generate the CP_Index, and writes the
TLB entry using the TLBWI instruction (tlb_write_indexed()).

However there's an instruction for that, TLBWR (tlb_write_random()) so
use that instead.

This happens to also fix an issue with Ingenic XBurst cores where the
same TLB entry is replaced each time preventing forward progress on
stores due to alternating between TLB load misses for the instruction
fetch and TLB store misses.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 13:00:02 +02:00
James Hogan facaaec1a7 MIPS: KVM: Use local_flush_icache_range to fix RI on XBurst
MIPS KVM uses mips32_SyncICache to synchronise the icache with the
dcache after dynamically modifying guest instructions or writing guest
exception vector. However this uses rdhwr to get the SYNCI step, which
causes a reserved instruction exception on Ingenic XBurst cores.

It would seem to make more sense to use local_flush_icache_range()
instead which does the same thing but is more portable.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 12:59:54 +02:00
James Hogan 90f91356c7 MIPS: Export local_flush_icache_range for KVM
Export the local_flush_icache_range function pointer for GPL modules so
that it can be used by KVM for syncing the icache after binary
translation of trapping instructions.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 12:59:28 +02:00
James Hogan 7006e2dfda MIPS: KVM: Allocate at least 16KB for exception handlers
Each MIPS KVM guest has its own copy of the KVM exception vector. This
contains the TLB refill exception handler at offset 0x000, the general
exception handler at offset 0x180, and interrupt exception handlers at
offset 0x200 in case Cause_IV=1. A common handler is copied to offset
0x2000 and offset 0x3000 is used for temporarily storing k1 during entry
from guest.

However the amount of memory allocated for this purpose is calculated as
0x200 rounded up to the next page boundary, which is insufficient if 4KB
pages are in use. This can lead to the common handler at offset 0x2000
being overwritten and infinitely recursive exceptions on the next exit
from the guest.

Increase the minimum size from 0x200 to 0x4000 to cover the full use of
the page.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 12:59:13 +02:00
Paolo Bonzini 146b2cfe0c 1. Several minor fixes and cleanups for KVM:
2. Fix flag check for gdb support
 3. Remove unnecessary vcpu start
 4. Remove code duplication for sigp interrupts
 5. Better DAT handling for the TPROT instruction
 6. Correct addressing exception for standby memory
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTiD4+AAoJEBF7vIC1phx88poQALJkg1EZLePQBwuqe3XKeUnV
 AxbtP1T5++Pv+JpXj/mTmI4ToE3U+t66iObCZ8GAWZtXNr47yJQRetTqSU1G8BFe
 eLpuWhyaQD31awp5M9sWIAzNjqnO4vR0f6kbVeoXbRmPzdZY19QaQb5QIRFMA/GT
 hSYlNoftRfM/e2ZRFUvqiMIKFHs2r/f9T+7SMRhu3YeZo42N3KOnIwFQrLCoaP+x
 8GBmxfl0OaEU9Rer6/MvyJVdMHD5ap4UyreaB5PLVtUNGIrcAJ2vjQGbF78bRonA
 9SwJ0mMEfzJoH6gZXDEby1e/p7MJ80wHf9jMoy2u2qtyvNuQIyBWS1eco7LH5dpd
 pxXcViLC8proiXfFK/6N4ra5cr3auMAmA5iX1LjD+ZxhAjlA+WTcC31jSfueDn33
 mBpDASLcoJXbPoEhWiAjP8wkgfUAQnr5CPu5lrmloOrj5llYx0FL2gDhX5dXe7op
 5orTAcEtfSxqosK/Av2oQnmUU61BkI4UuBwCbpqM/1w8oKcYX4jUE5Yx/Kmej80Z
 MtpYUnBDmJaYPogddr8q5QcnRyLEoRUKfKu5lDnlLaP1oi7vr+WBR+BkNLl0/o7o
 +XVdruc7OtC/Ahtep8unkLV5C8j1siXergjvHXhHjpGNsIQ2tfD8LO55ST4vYkUd
 GAosCgM/6wt8YmK67qc+
 =84hG
 -----END PGP SIGNATURE-----

Merge tag 'kvm-s390-20140530' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-next

1. Several minor fixes and cleanups for KVM:
2. Fix flag check for gdb support
3. Remove unnecessary vcpu start
4. Remove code duplication for sigp interrupts
5. Better DAT handling for the TPROT instruction
6. Correct addressing exception for standby memory
2014-05-30 12:57:10 +02:00
Matthew Rosato 5a5e65361f KVM: s390: Intercept the tprot instruction
Based on original patch from Jeng-fang (Nick) Wang

When standby memory is specified for a guest Linux, but no virtual memory has
been allocated on the Qemu host backing that guest, the guest memory detection
process encounters a memory access exception which is not thrown from the KVM
handle_tprot() instruction-handler function. The access exception comes from
sie64a returning EFAULT, which then passes an addressing exception to the guest.
Unfortunately this does not the proper PSW fixup (nullifying vs.
suppressing) so the guest will get a fault for the wrong address.

Let's just intercept the tprot instruction all the time to do the right thing
and not go the page fault handler path for standby memory. tprot is only used
by Linux during startup so some exits should be ok.
Without this patch, standby memory cannot be used with KVM.

Signed-off-by: Nick Wang <jfwang@us.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Tested-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-05-30 09:39:40 +02:00
David Hildenbrand 3192c63950 KVM: s390: a VCPU is already started when delivering interrupts
This patch removes the start of a VCPU when delivering a RESTART interrupt.
Interrupt delivery is called from kvm_arch_vcpu_ioctl_run. So the VCPU is
already considered started - no need to call kvm_s390_vcpu_start. This function
will early exit anyway.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-05-30 09:39:39 +02:00
David Hildenbrand 2de3bfc25a KVM: s390: check the given debug flags, not the set ones
This patch fixes a minor bug when updating the guest debug settings.
We should check the given debug flags, not the already set ones.
Doesn't do any harm but too many (for now unused) flags could be set internally
without error.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-05-30 09:39:38 +02:00
Jens Freimann 22ff4a3366 KVM: s390: clean up interrupt injection in sigp code
We have all the logic to inject interrupts available in
kvm_s390_inject_vcpu(), so let's use it instead of
injecting irqs manually to the list in sigp code.

SIGP stop is special because we have to check the
action_flags before injecting the interrupt. As
the action_flags are not available in kvm_s390_inject_vcpu()
we leave the code for the stop order code untouched for now.

Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-05-30 09:39:37 +02:00
Thomas Huth a0465f9ae4 KVM: s390: Enable DAT support for TPROT handler
The TPROT instruction can be used to check the accessability of storage
for any kind of logical addresses. So far, our handler only supported
real addresses. This patch now also enables support for addresses that
have to be translated via DAT first. And while we're at it, change the
code to use the common KVM function gfn_to_hva_prot() to check for the
validity and writability of the memory page.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-05-30 09:39:36 +02:00
Thomas Huth 9fbc02760d KVM: s390: Add a generic function for translating guest addresses
This patch adds a function for translating logical guest addresses into
physical guest addresses without touching the memory at the given location.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-05-30 09:39:35 +02:00
Linus Torvalds fe45736f41 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
 "The usual random collection of relatively small ARM fixes"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8063/1: bL_switcher: fix individual online status reporting of removed CPUs
  ARM: 8064/1: fix v7-M signal return
  ARM: 8057/1: amba: Add Qualcomm vendor ID.
  ARM: 8052/1: unwind: Fix handling of "Pop r4-r[4+nnn],r14" opcode
  ARM: 8051/1: put_user: fix possible data corruption in put_user
  ARM: 8048/1: fix v7-M setup stack location
2014-05-29 18:31:09 -07:00
Lin Yongting 9c98666163 ARM: 8049/1: ftrace/add save_stack_trace_regs() implementation
When configure kprobe events of ftrace with "stacktrace" option enabled
in arm, there is no stacktrace was recorded after the kprobe event was
triggered. The root cause is no save_stack_trace_regs() function implemented.

Implement the save_stack_trace_regs() function in arm, then ftrace will
call this architecture-related function to record the stacktrace into
ring buffer.

After this fix, stacktrace can be recorded, for example:

 # mount -t debugfs nodev /sys/kernel/debug
 # echo "p:netrx net_rx_action" >> /sys/kernel/debug/tracing/kprobe_events
 # echo 1 > /sys/kernel/debug/tracing/events/kprobes/netrx/enable
 # echo 1 > /sys/kernel/debug/tracing/options/stacktrace
 # echo 1 > /sys/kernel/debug/tracing/tracing_on
 # ping 127.0.0.1 -c 1
 # echo 0 > /sys/kernel/debug/tracing/tracing_on

 # cat /sys/kernel/debug/tracing/trace
 # tracer: nop
 #
 # entries-in-buffer/entries-written: 12/12   #P:1
 #
 #                              _-----=> irqs-off
 #                             / _----=> need-resched
 #                            | / _---=> hardirq/softirq
 #                            || / _--=> preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
             <------ missing some entries ---------------->
             ping-1200  [000] dNs1   667.603250: netrx: (net_rx_action+0x0/0x1f8)
             ping-1200  [000] dNs1   667.604738: <stack trace>
  => net_rx_action
  => do_softirq
  => local_bh_enable
  => ip_finish_output
  => ip_output
  => ip_local_out
  => ip_send_skb
  => ip_push_pending_frames
  => raw_sendmsg
  => inet_sendmsg
  => sock_sendmsg
  => SyS_sendto
  => ret_fast_syscall

Signed-off-by: Lin Yongting <linyongting@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 01:12:32 +01:00
Paul Bolle 2961b4bf70 ARM: 8065/1: remove last use of CONFIG_CPU_ARM710
Support for ARM710 CPUs was removed in v3.5. Now remove the last code
depending on its Kconfig macro.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 01:12:30 +01:00
Arun K S 3780f7ab49 ARM: 8062/1: Modify ldrt fixup handler to re-execute the userspace instruction
We will reach fixup handler when one thread(say cpu0) caused an undefined exception, while another thread(say cpu1) is unmmaping the page.

Fixup handler returns to the next userspace instruction which has caused the undef execption, rather than going to the same instruction.

ARM ARM says that after undefined exception, the PC will be pointing
to the next instruction. ie +4 offset in case of ARM and +2 in case of Thumb

And there is no correction offset passed to vector_stub in case of
undef exception.

File: arch/arm/kernel/entry-armv.S +1085
vector_stub     und, UND_MODE

During an undefined exception, in normal scenario(ie when ldrt
instruction does not cause an abort) after resorting the context in
VFP hardware, the PC is modified as show below before jumping to
ret_from_exception which is in r9.

File: arch/arm/vfp/vfphw.S +169
@ The context stored in the VFP hardware is up to date with this thread
vfp_hw_state_valid:
   tst     r1, #FPEXC_EX
   bne     process_exception     @ might as well handle the pending
                                 @ exception before retrying branch
                                 @ out before setting an FPEXC that
                                 @ stops us reading stuff
        VFPFMXR FPEXC, r1        @ Restore FPEXC last
        sub     r2, r2, #4       @ Retry current instruction - if Thumb
        str     r2, [sp, #S_PC]  @ mode it's two 16-bit instructions,
                                 @ else it's one 32-bit instruction, so
                                 @ always subtract 4 from the following
                                 @ instruction address.

But if ldrt results in an abort, we reach the fixup handler and return
to ret_from_execption without correcting the pc.

This patch modifes the fixup handler to re-execute the same instruction which caused undefined execption.

Signed-off-by: Vinayak Menon <vinayakm.list@gmail.com>
Signed-off-by: Arun KS <getarunks@gmail.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 01:12:28 +01:00
Will Deacon 8a87411b64 ARM: 8047/1: rwsem: use asm-generic rwsem implementation
asm-generic offers an atomic-add based rwsem implementation, which
can avoid the need for heavier, spinlock-based synchronisation on the
fast path.

This patch makes use of the optimised implementation for ARM CPUs.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 01:12:25 +01:00
Russell King 8ef418c717 ARM: l2c: trial at enabling some Cortex-A9 optimisations
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:41 +01:00
Russell King 560be6136b ARM: l2c: add warnings for stuff modifying aux_ctrl register values
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:38 +01:00
Russell King 314e47b7b6 ARM: l2c: print a warning with L2C-310 caches if the cache size is modified
As we have now removed all instances of the L2C-310 having its cache
size "modified" via platform/SoC code, discourage new cases showing
up by printing a warning.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:37 +01:00
Russell King 678ea28b7c ARM: l2c: remove old .set_debug method
We no longer need or require the .set_debug method; we handle everything
it used to do via the .write_sec method instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:35 +01:00
Russell King 851d6d7117 ARM: l2c: kill L2X0_AUX_CTRL_MASK before anyone else makes use of this
L2X0_AUX_CTRL_MASK is not useful for PL310s.  It would be better if
people thought about their value for this rather than cargo-cult
programming.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:32 +01:00
Russell King dcf9c7f9f4 ARM: l2c: zynq: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:30 +01:00
Russell King 2c4133c5d0 ARM: l2c: zynq: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:28 +01:00
Russell King b28dd4ac66 ARM: l2c: vexpress: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:25 +01:00
Russell King 060bf2af12 ARM: l2c: vexpress ca9x4: move L2 cache initialisation earlier
It is beneficial to have the L2 cache up and running earlier in the
system boot.  Not only will this allow for simpler code when we come to
enable some features, but it also means that we get a more accurate
bogomips value for the udelay() loop.  Calibrating the loop with the
L2 cache off, and then running with the L2 cache on is not the best
idea.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:24 +01:00
Russell King c59917f877 ARM: l2c: ux500: don't try to change the L2 cache auxiliary control register
ux500 can't change the auxiliary control register, so there's no point
passing values to try and modify it to the l2x0 init functions.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:21 +01:00
Russell King c4a202c8ae ARM: l2c: ux500: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:19 +01:00
Russell King 6716173347 ARM: l2c: ux500: implement dummy write_sec method
ux500 can't write to any of the secure registers on the L2C controllers,
so provide a dummy handler which ignores all writes.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:17 +01:00
Russell King 00123d9a8d ARM: l2c: tegra: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:15 +01:00
Russell King b16cee70fd ARM: l2c: tegra: convert to common l2c310 early resume functionality
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:12 +01:00
Russell King f9040550be ARM: l2c: tegra: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:10 +01:00
Russell King 4d6229f6e5 ARM: l2c: sti: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  We can remove the .init_machine as it becomes
the same as the generic version.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:08 +01:00
Russell King adf4b00ebf ARM: l2c: spear13xx: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:06 +01:00
Russell King 8b5c18f056 ARM: l2c: socfpga: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:04 +01:00
Russell King 2edb89cd8e ARM: l2c: shmobile: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:02 +01:00
Russell King 2a2d2fff1d ARM: l2c: rockchip: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  This also allows us to eliminate the
.init_machine function as this becomes the same as the generic version.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:50:00 +01:00
Russell King 39b53458cc ARM: l2c: realview: improve commentry about the L2 cache requirements
Add better commentry about the L2 cache requirements on these platforms.
Unfortunately, the auxiliary control register is not pre-set to indicate
the correct cache parameters, so we have to manually program these.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:57 +01:00
Russell King 918197be39 ARM: l2c: prima2: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  Along with this change, we can delete l2x0.c
from prima2.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:55 +01:00
Russell King c95680e6f5 ARM: l2c: prima2: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:53 +01:00
Sekhar Nori d941f86fad ARM: l2c: AM43x: add L2 cache support
Add support for L2 cache controller (PL310) on AM437x SoC.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:51 +01:00
Sekhar Nori b39b14e62a ARM: l2c: omap2+: get rid of init call
Get rid of init call to initialize L2 cache.  Instead use the init_early
machine hook. This helps in using the initialization routine across
SoCs without the need of ugly cpu_is_*() checks.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:49 +01:00
Sekhar Nori d196483dfc ARM: l2c: omap2+: get rid of redundant cache replacement policy setting
L2 cache initialization for OMAP4 redundantly sets the cache policy to
Round-Robin. This is not needed since thats the PL310 default anyway.

Removing this reduces the number of platform specific aux control
settings.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:47 +01:00
Russell King 7a09b28e8a ARM: l2c: omap2: avoid reading directly from the L2 registers in platform code
Avoid reading directly from the L2 registers in platform code.  The L2
code will have already saved the register values itself into the
l2x0_saved_regs structure, so platform code should just move these
values to where they're required.

This is safe because the L2x0 will have been initialised by an early
initcall, whereas the OMAP4 PM code is initialised late.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:45 +01:00
Russell King 72ecbed1c5 ARM: l2c: omap2: remove explicit non-secure access bits
Since we now always enable NS access to the unlock registers, this can
be removed from OMAP4.  Remove the NS access bit for the interrupt
registers from OMAP4 as well - nothing in the kernel accesses that yet,
and we can add it in core code when we have the need.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:42 +01:00
Russell King deb125abad ARM: l2c: omap2: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:40 +01:00
Russell King 7eab0039d3 ARM: l2c: omap2: remove explicit SMI calls to enable L2 cache
Now that OMAP2 uses the write_sec method, we don't need to enable the L2
cache in OMAP2 specific code; this can be done via the normal mechanisms
in the L2C code.  Remove the OMAP2 specific code.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:38 +01:00
Russell King 36827edd2e ARM: l2c: omap2: implement new write_sec method
With the write_sec method, we no longer need to override the default
L2C disable method, and we no longer need the L2C set_debug method.
Both of these can be handled via the write_sec method.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:36 +01:00
Russell King 8523f61537 ARM: l2c: nomadik: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  This also allows us to eliminate the
.init_machine function as it is identical to the generic version.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:34 +01:00
Russell King 42708e37a3 ARM: l2c: nomadik: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:32 +01:00
Russell King 9847cf0403 ARM: l2c: mvebu: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:30 +01:00
Russell King b9f71aad7c ARM: l2c: imx vf610: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  Since the .init_irq method only calls
irqchip_init(), we can remove that too as the generic code will take
care of that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:28 +01:00
Russell King f5a5f430d9 ARM: l2c: imx: convert to common l2c310 early resume functionality
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:24 +01:00
Russell King 28ed53f222 ARM: l2c: imx: remove direct write to power control register
Now that we handle this in core code, we don't need platforms enabling
the low power modes directly.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:22 +01:00
Russell King 513b9a08f8 ARM: l2c: highbank: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:21 +01:00
Russell King e761f6f332 ARM: l2c: highbank: remove explicit SMI call in L2 cache initialisation
Now that highbank uses the write_sec method, we don't need to enable
the L2 cache in SoC specific code; this can be done via the normal
mechanisms in the L2C code.

Checking with Rob Herring:
> > Can we kill the "highbank_smc1(0x102, 0x1);" here?	That means
> > l2x0_of_init() will see the L2 cache disabled, and will try to enable
> > it via the write_sec hook, so it should do the right thing.
>
> Yes, that should work. You should be able to just call l2x0_of_init
> unconditionally. The condition was really to just avoid the smc on
> Midway which does get handled on h/w, but not if running virtualized.

So also drop the DT check too.  I'm leaving the config check in place
so that if L2 is disabled, the write_sec hook can be optimised away.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:18 +01:00
Russell King 0074fb2c9e ARM: l2c: highbank: implement new write_sec method
With the write_sec method, we no longer need to override the default L2C
disable method.  This can be handled via the write_sec method instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:17 +01:00
Russell King 15b0bc4041 ARM: l2c: exynos: convert to generic l2c OF initialisation (and thereby fix it)
exynos was unconditionally calling the L2 cache initialisation from an
early_initcall.  This breaks multiplatform kernels.  Thankfully,
converting to generic l2c initialisation fixes this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:15 +01:00
Russell King 25a9ef63cd ARM: l2c: exynos: convert to common l2c310 early resume functionality
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:12 +01:00
Russell King dfbdd3d554 ARM: l2c: exynos: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:10 +01:00
Russell King 24cb65feab ARM: l2c: cns3xxx: remove cache size override
The cache size should already be present in the L2 cache auxiliary
control register: it is part of the integration process to configure
the hardware IP.  Most platforms get this right, yet still many
cargo-cult program, and assume that they always need specifying to
the L2 cache code.  Remove them so we can find out which really need
this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:07 +01:00
Russell King a048711c0b ARM: l2c: berlin: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  We can remove the explicit machine init too
as this becomes identical to the generic version.

Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:06 +01:00
Russell King d458773fb3 ARM: l2c: bcm_5301x: convert to generic l2c OF initialisation
Remove the explicit call to l2x0_of_init(), converting to the generic
infrastructure instead.  We can remove the explicit machine init too
as this becomes identical to the generic version.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:04 +01:00
Russell King de7e75326c ARM: l2c: provide common PL310 early resume code
Provide a common assembly implementation for PL310 resume code.  Certain
platforms need to re-initialise the L2C cache early as it may preserve
data across a S2RAM cycle, and therefore must be enabled along with the
L1 cache and MMU.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:01 +01:00
Russell King 805604ef85 ARM: l2c: add platform independent core L2 cache OF initialisation
Add a hook into the core ARM code to perform L2 cache initialisation
in a platform independent manner.  Platforms still get to indicate
their auxiliary control register values and mask, but the
initialisation call will now be made from generic code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:49:00 +01:00
Russell King a4b041a0e2 ARM: l2c: always enable non-secure access to lockdown registers
Since we always write to these during the cache initialisation, it is
a good idea to always have the non-secure access bit set.  Set it in
core code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:57 +01:00
Russell King 3a43b581da ARM: l2c: always enable low power modes
Always enable the L2C low power modes on L2C-310 R3P0 and newer parts.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:54 +01:00
Russell King 36bccb11a4 ARM: l2c: remove platforms/SoCs setting early BRESP
Since we now automatically enable early BRESP in core L2C-310 code when
we detect a Cortex-A9, we don't need platforms/SoCs to set this bit
explicitly.  Instead, they should seek to preserve the value of bit 30
in the auxiliary control register.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:51 +01:00
Russell King 4374d64933 ARM: l2c: add automatic enable of early BRESP
The AXI bus protocol requires that a write response should only be
sent back to the master when the last write has been accepted.  Early
BRESP allows the L2C-310 to send the write response as soon as the
store buffer accepts the write address.

Cortex-A9 processors can signal to the L2C-310 that they wish to be
notified early, and if this optimisation is enabled, the L2C-310 can
signal an early write response.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:50 +01:00
Russell King ddf7d79bc7 ARM: l2c: move L2 cache register saving to a more sensible location
Move the L2 cache register saving to a more sensible location - after
the cache has been enabled, and fixups have been run.  We move the
saving of the auxiliary control register into the ->save function as
well which makes everything operate in a sane and maintainable way.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:47 +01:00
Russell King d9d1f3e2d7 ARM: l2c: check that DT files specify the required "cache-unified" property
This is a required property, and should always be specified.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:45 +01:00
Russell King 1a5a954ce0 ARM: l2c: fix register naming
We have a mixture of different devices with different register layouts,
but we group all the bits together in an opaque mess.  Split them out
into those which are L2C-310 specific and ones which refer to earlier
devices.  Provide full auxiliary control register definitions.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:43 +01:00
Russell King a8875a092a ARM: l2c: implement L2C-310 erratum 752271 in core L2C code
Rather than having SoCs work around L2C erratum themselves, move them
into core code.  This erratum affects the double linefill feature which
needs to be disabled for r3p0 to r3p1-50rel0.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:41 +01:00
Russell King 8abd259f65 ARM: l2c: provide generic hook to intercept writes to secure registers
When Linux is running in the non-secure world, any write to a secure
L2C register will generate an abort.  Platforms normally have to call
firmware to work around this.  Provide a hook for them to intercept
any L2C secure register write.

l2c_write_sec() avoids writes to secure registers which are already set
to the appropriate value, thus avoiding the overhead of needlessly
calling into the secure monitor.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:39 +01:00
Russell King c0fe18ba30 ARM: l2c: move errata configuration options to arch/arm/mm/Kconfig
Move the L2C-310 errata configuration options to arch/arm/mm/Kconfig
along side the option which enables support for this device.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:37 +01:00
Russell King 0493aef4da ARM: l2c: move way size calculation data into l2c_init_data
Move the way size calculation data (base of way size) out of the
switch statement into the provided initialisation data.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:34 +01:00
Russell King 5f47c38704 ARM: l2c: add decode for L2C-220 cache ways
Rather than assuming these are always 8-way, it can be decoded from the
auxillary register in the same manner as L2C-210.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:33 +01:00
Russell King 051334bdc5 ARM: l2c: move type string into l2c_init_data structure
Rather than decoding this from the ID register, store it in the
l2c_init_data structure.  This simplifies things some more, and
allows us to better provide further details as to how we're
driving the cache.  We print the cache ID value anyway should we
need to precisely identify the cache hardware.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:30 +01:00
Russell King cf9ea8f130 ARM: l2c: remove obsolete l2x0 ops for non-OF init
non-OF initialisation has never been used with any cache controller
which isn't an ARM cache controller, so we can safely get rid of the
old (and buggy) l2x0_*-based operations structure.

This is also the last reference to:
- l2x0_clean_line()
- l2x0_inv_line()
- l2x0_flush_line()
- l2x0_flush_all()
- l2x0_clean_all()
- l2x0_inv_all()
- l2x0_inv_range()
- l2x0_clean_range()
- l2x0_flush_range()
- l2x0_enable()
- l2x0_resume()
so kill those functions too.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:28 +01:00
Russell King 9081114837 ARM: l2c: convert Broadcom L2C-310 to new code
The Broadcom L2C-310 devices use ARMs L2C-310 R2P3 or later.  These
require no errata workarounds, and so we can directly call the l2c210
functions from their methods.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:26 +01:00
Russell King 733c6bbafd ARM: l2c: add L2C-220 specific handlers
The L2C-220 is different from the L2C-210 and L2C-310 in that every
operation is a background operation: this means we have to use
spinlocks to protect all operations, and we have to wait for every
operation to complete.

Should a second operation be attempted while a previous operation
is in progress, the response will be an imprecise abort.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:24 +01:00
Russell King f777332ba7 ARM: l2c: use L2C-210 handlers for L2C-310 errata-less implementations
Where no errata affect the L2C-310 handlers, they are functionally
equivalent to L2C-210.  Re-use the L2C-210 handlers for the L2C-310
part.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:21 +01:00
Russell King ebd4219f10 ARM: l2c: implement L2C-310 erratum 588369 as a method override
Implement L2C-310 erratum 588369 by overriding the invalidate range
and flush range methods in the outer_cache operations structure.
This allows us to sensibly contain the erratum code in one place
without affecting other locations/implemetations.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:19 +01:00
Russell King 99ca1772e5 ARM: l2c: implement L2C-310 erratum 727915 as a method override
Implement L2C-310 erratum 727915 by overriding the flush_all method
in the outer_cache operations structure.  This allows us to sensibly
contain the erratum code in one place without affecting other
locations or implementations.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:17 +01:00
Russell King 6a28cf59ff ARM: l2c: add L2C-210 specific handlers
Add L2C-210 specific cache operation handlers.  These are tailored to
the requirements of the L2C-210 cache controller, which doesn't
require any workarounds.  We avoid using the way operations during
normal operation, which means we can avoid locking: the only time
we use the way operations are during initialisation, and when
disabling the cache.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:15 +01:00
Russell King bda0b74e6a ARM: l2c: move pl310_set_debug() into l2c-310 code
Move the pl310_set_debug() into the l2c-310 code area, and don't hide
it with ifdefs.  Rename it to l2c310_set_debug().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:13 +01:00
Russell King faf9b2e701 ARM: l2c: simplify l2x0 unlocking code
The l2x0 unlocking code is only called from l2x0_enable() now, so move
the logic entirely into that function and simplify it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:11 +01:00
Russell King 09a5d180ed ARM: l2c: clean up save/resume functions
Rename the pl310 save/resume functions to have a l2c310 prefix - this
is it's official name.  Use a local cached copy of the l2x0_base
virtual address, and also realise that many of the resume function
tails are the same as the enable functions, so make a call to the
enable function instead of duplicating that code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:08 +01:00
Russell King b98556f26d ARM: l2c: move and add ARM L2C-2x0/L2C-310 save/resume code to non-OF
Add the save/resume code hooks to the non-OF implementations as well.
There's no reason for the non-OF implementations to be any different
from the OF implementations.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:05 +01:00
Russell King cdef8689ef ARM: l2c: clean up L2 cache initialisation messages
Make one of them purely "English", and the other purely technical.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:03 +01:00
Russell King 75461f5c84 ARM: l2c: implement fixups for L2 cache controller quirks/errata
Rather than putting quirk handling in __l2c_init(), move it out to a
separate function which individual implementations can specify.  This
helps to localise the quirks to those implementations which require
them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:48:01 +01:00
Russell King 40266d6f41 ARM: l2c: move aurora broadcast setup to enable function
Rather than having this hacked into the OF initialiation function, we
can handle this via the enable function instead.  While here, clean
up that code and comments a little.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:59 +01:00
Russell King 9a07f27bc5 ARM: l2c: only write the auxiliary control register if required
Avoid unnecessary writes to the auxiliary control register if the
register already contains the required value.  This allows us to
avoid invoking the platforms secure monitor code unnecessarily.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:57 +01:00
Russell King 17f3f99fab ARM: l2c: write auxctrl register before unlocking
We should write the auxillary control register before unlocking: the
write may be necessary to enable non-secure access to the lock
registers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:54 +01:00
Russell King 3b8bad5758 ARM: l2c: provide enable method
Providing an enable method gives L2 cache controllers a chance to do
special handling at enable time.  This allows us to remove a hack in
l2x0_unlock() for Marvell Aurora L2 caches.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:51 +01:00
Russell King da3627fbda ARM: l2c: group implementation specific code together
Back in the mists of time, someone decided that it would be a good idea
to group like functions together - so all the save functions in one
place, all the resume functions in another, all the OF parsing functions
some place else.

This makes it difficult to get an overview on what a particular
implementation is doing - grouping an implementations specific functions
together makes more sense, because you can see what it's doing without
the clutter of other implementations.

Organise it according to implementation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:50 +01:00
Russell King c40e7eb6c0 ARM: l2c: move l2c save function to __l2c_init()
There's no reason this functionality should be specific to DT, so move
it into the common initialisation function.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:47 +01:00
Russell King 9846dfc98f ARM: l2c: pass iomem address into data->save function
Pass the iomem address into this function so we don't have to keep
accessing it from a global.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:45 +01:00
Russell King 96054b0a99 ARM: l2c: clean up OF initialisation a bit
Rather than having a boolean and other tricks to disable some bits of
l2x0_init(), split this function into two parts: a common part shared
between OF and non-OF, and the non-OF part.

The common part can take a block of function pointers, and the cache
ID (to cope with Aurora's DT specified ID.)  Eliminate the redundant
setting of l2x0_base in the OF case, moving it to the non-OF init
function.

This allows us to localise the OF-specific initialisation handling
from the non-OF handling.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:43 +01:00
Russell King 14b882cfa3 ARM: l2c: add and use L2C revision constants
The revision namespace is specific to the L2 cache part, so don't name
these with generic identifiers, use a part specific identifier.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:41 +01:00
Russell King 83841fe1fb ARM: l2c: rename cache_wait_way()
cache_wait_way() is actually used to wait for a particular mask to
report clear; it's not really got much to do with cache ways at all.
Indeed, it gets used to wait for the C bit to clear on older caches.
Rename this with a more generic function name which better reflects
its purpose: l2c_wait_mask().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:39 +01:00
Russell King df5dd4c6e2 ARM: l2c: provide generic helper for way-based operations
Provide a generic helper function for way based operations.  These are
always background operations, and thus have to be waited for before a
new operation is commenced.  This helper extracts that requirement from
several locations in the code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:36 +01:00
Russell King 37abcdb919 ARM: l2c: split out cache unlock code
Split the cache unlock code out of l2x0_unlock().  We want to be able
to re-use this functionality later.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:34 +01:00
Russell King 2b2a87a12d ARM: l2c: provide generic function for calling set_debug method
Provide a generic function which always calls the set_debug method.
This will be used later in the series as some work-arounds require
that the debug register be written.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:32 +01:00
Russell King c02642bc10 ARM: l2c: rename OF specific things, making l2x0_of_data available to all
Rename a few things to help distinguish their function(s):
 l2x0_of_data -> l2c_init_data
 setup -> of_parse
 add of_ prefix to OF specific data

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:29 +01:00
Russell King ce84130384 ARM: l2c: tidy up l2x0_of_data declarations
Remove NULL initialisers, make these all __initconst structures, and
order their members in the same order as the structure declaration.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:28 +01:00
Russell King a65bb92560 ARM: l2c: add helper for L2 cache controller DT IDs
Make it easier to declare L2 cache controller DT IDs by using a macro.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:25 +01:00
Russell King 1f1d5b745a ARM: outer cache: add WARN_ON() to outer_disable()
Add WARN_ON() conditions to outer_disable() to ensure that its
requirements aren't violated.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-30 00:47:23 +01:00
Linus Torvalds a991639c26 - Fix CoW regression for transparent hugepages by routing set_pmd_at to
set_pte_at, which correctly handles PTE_WRITE and will mark the
   resulting table entry as read-only where appropriate.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCgAGBQJThzGHAAoJEC379FI+VC/ZXKUP/2sJVWkvaON/8wx8j2xLAS1o
 DhzFIQVdWirji4EI/qDtPZZSsFbPztE0w4Lg880RW6QdY74S56Gpd40ollm8JXU+
 r/GCPMt9JwM8UsmT91MMUQA5qY0iyirG2FyWdihZwdwxhidWYKxBGBZYSq4a4qly
 yhqlpBH/OssnLxN/kSn1EvEpylxr/rDlU3r4bKsvlQ61woZuFu+WRZDmYA2fuAWW
 cemTXxUmCR70jYPhCuwGA1uBLyKc6QPcssb86iuW8vhhXj3932dDuvfoobGEe7rC
 VwilTujQUbBXCP3/b+agbi3q4eabX9Wr1yM8fvLx23k0cRKvMyhqR4xIxKpPDFPk
 tarKhpBODER5D7X7na5D/9f8URB2U3EWrwCn2Wijmh113A98ADR+bUpgnZA2wdoR
 /ehy4VlTmajESL1CQ8m1PuSTdBNg3Yi0skQ0pOf+dI6vj8pjF53TfSRn32ior4Ow
 4/k+FT1jfLJZOncYFI+AyRhmOi+nqzuxZiurH7eukkqnzJ9eWZtO0WnjHBhlqx7X
 C1kxyd+2TpkqHUmF/aybgEEdZKN8EtXQevIMKzlemTu8Ptyrao+qqz9NctV4e7AC
 I+n2u0KN4QOLygFCsk5KuG5U0IgxoFideMdFNhA3M0CfSke+AfYf3AH70/mIk0Qz
 fMvUR3OsK+aOUx/aXVed
 =o10I
 -----END PGP SIGNATURE-----

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

Pull arm64 fix from Will Deacon:
 "Fix CoW regression for transparent hugepages by routing set_pmd_at to
  set_pte_at, which correctly handles PTE_WRITE and will mark the
  resulting table entry as read-only where appropriate"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: mm: fix pmd_write CoW brokenness
2014-05-29 14:14:43 -07:00
Maxime Ripard 4cff2a2479 ARM: configs: update Allwinner options
Update sunxi_defconfig and multi_v7 with all the latest Allwinner
additions.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-29 13:39:54 -07:00
Olof Johansson 8320857b1d Linux 3.15-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTfR2zAAoJEHm+PkMAQRiG3noH/2s+KUge3qO2M+AmxttUo74B
 +npAMdbqYR3MdEiwxYZfsHcMu4Ye/IKLcrh4pydB5hI2mdjtGkH1bnmia0f1ve/c
 Z/a0256+W8gWp7mcUBqSNztqLPAWa7wKOqNdLjj5idr1BSj6u8im+fQ9FBh2woki
 1fyYAuq/60lq4CMOKJvkA95V1Ome/jO+8tS4PguOgsCETQxCVFGurZcBbG3Mx5Y3
 v+ioCqeRc6GvxPFR6YngnTZCrsLxSRT3tnO2Qy5zX7dxjIQkCEbvIckpBQv01Y3R
 wNUaX+2Jae207igxrEv8CjmCFnmZFuUI15aWWCy6fOS/j8bjuk6ThYJO8N4ZBM0=
 =2ShG
 -----END PGP SIGNATURE-----

Merge tag 'v3.15-rc6' into next/defconfig

Linux 3.15-rc6
2014-05-29 13:39:43 -07:00
Olof Johansson e1134cb6b3 Most likely the last pull request from me for omap changes for
v3.16 that's dts fixes for clocks and enabling few features
 that were still being discussed earlier:
 
 - A bunch of omap clock related dts fixes queued by Tero Kristo.
 
 - Enable parallel nand on am437x that was not merged earlier as
   I requested more information about the muxing for it. And
   we need to also enable ecc hardware support for am43xx.
 
 - Enable the modem support for n900 that was dropped earlier
   because we had to fix the related hwmod entry first with patch
   ARM: OMAP2+: Fix ssi hwmod entry to allow idling.
 
 - And finally, add the omap2 clock dts files. These will allow
   us to enable the dt clocks and drop the legacy clocks for omap2
   with a follow-up patch once the related clock driver binding
   changes are merged.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJThiGbAAoJEBvUPslcq6VzM2MQAItHkURx2sINDYkB/ghkajFV
 h8fvmOlFRQjiQ4V+J1MZXIEhU6Tx6xiOTCydhpCRPuDpnXiEAWXcJv42oqbkKeiB
 fdlsMbfifnKax2HGPCqAbKNpdpjl65YiKTfpQvAhQ/iFGOHhczWbCKZ+xktk6K7X
 mJFI68itHNZsp10NRwWXspzZaCAM2+LEGrXFIz6rryvbZDD07bFRi7bWsLT8MfzU
 laTWQAwEjyjayQoBYJZem3c6I3wIiSL2MvB7fg0JOo7Xr6vkAXeaL3OqbKnMrK8D
 4cd/Fh2BGPTmKC2bVugkIgkASmDOx3fHdJJ+NmwApcBUgGq1MOtEJ7CDsw36Qu/Y
 Wl/5/8zoxvRr5PBM9/D4QPV2qDJ1iSqYx9hVt5DFIBCyJjy33bJpv9+j1017K6OE
 RXFb+386yjPGfzwoCXaku9ijyfoBFe+7Ys8iZ10qJbK945klaWU5GA/6oL+dIBtZ
 1XA3fiG1znGrks35+944dCuD9EUphrJ5ZJ0eZTc/PpE0QG8m4Kbp1Qr6KB7c07uL
 4NgDG2iveWArGG0EtEJelacFb1EjsvLQ4qNNs+0ch5KBB3UB3NQoDRLL7arURyqo
 nI8qRRKFgYMWlx7J7kckgNP35wJvLVQYVlExsAFE1YZBU+ABuDoAyta2ZTdE3A9H
 5dxeTOYH83NcTV8c0Owq
 =X+qx
 -----END PGP SIGNATURE-----

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

Merge "omap dt fixes and and clocks for v3.16 merge window" from Tony Lindgren:

Most likely the last pull request from me for omap changes for
v3.16 that's dts fixes for clocks and enabling few features
that were still being discussed earlier:

- A bunch of omap clock related dts fixes queued by Tero Kristo.

- Enable parallel nand on am437x that was not merged earlier as
  I requested more information about the muxing for it. And
  we need to also enable ecc hardware support for am43xx.

- Enable the modem support for n900 that was dropped earlier
  because we had to fix the related hwmod entry first with patch
  ARM: OMAP2+: Fix ssi hwmod entry to allow idling.

- And finally, add the omap2 clock dts files. These will allow
  us to enable the dt clocks and drop the legacy clocks for omap2
  with a follow-up patch once the related clock driver binding
  changes are merged.

* tag 'omap-for-v3.16/dt-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: omap2 clock data
  ARM: dts: am437x-gp-evm: add support for parallel NAND flash
  ARM: OMAP2+: gpmc: enable BCH_HW ecc-scheme for AM43xx platforms
  ARM: dts: omap3 a83x: fix duplicate usb pin config
  ARM: dts: omap3: set mcbsp2 status
  ARM: dts: omap3-n900: Add modem support
  ARM: dts: omap3-n900: Add SSI support
  ARM: OMAP2+: Fix ssi hwmod entry to allow idling
  ARM: dts: AM4372: clk: efuse based crystal frequency detect
  ARM: dts: am43xx-clocks.dtsi: add ti, set-rate-parent to display clock path
  ARM: dts: omap5-clocks.dtsi: add ti, set-rate-parent to dss_dss_clk
  ARM: dts: omap4: add twd clock to DT
  ARM: dts: omap54xx-clocks: Correct abe_iclk clock node
  ARM: dts: omap54xx-clocks: remove the autoidle properties for clock nodes
  ARM: dts: am43x-clock: add tbclk data for ehrpwm
  ARM: dts: am33xx-clock: Fix ehrpwm tbclk data
  ARM: dts: set 'ti,set-rate-parent' for dpll4_m5 path
  ARM: dts: use ti,fixed-factor-clock for dpll4_m5x2_mul_ck
  ARM: dts: am43xx-clocks: use ti, fixed-factor-clock for dpll_per_clkdcoldo

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-29 12:43:43 -07:00
Will Deacon 08d38bebb4 ARM: kconfig: allow PCI support to be selected with ARCH_MULTIPLATFORM
When targetting ARCH_MULTIPLATFORM, we may include support for SoCs with
PCI-capable devices (e.g. mach-virt with virtio-pci).

This patch allows PCI support to be selected for these SoCs by selecting
CONFIG_MIGHT_HAVE_PCI when CONFIG_ARCH_MULTIPLATFORM=y and removes the
individual selections from multi-platform enabled SoCs.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-29 12:42:38 -07:00
Deng-Cheng Zhu 356d4c2040 MIPS: KVM: remove the stale memory alias support function unalias_gfn
The memory alias support has been removed since a1f4d39500 (KVM: Remove
memory alias support). So remove unalias_gfn from the MIPS port.

Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-29 21:38:21 +02:00
Olof Johansson 182434f748 Samsung exynos-cpuidle updates for v3.16
- From Daniel Lezcano:
  This patchset relies on the cpm_pm notifier to initiate the
  powerdown sequence operations from pm.c instead cpuidle.c.
  Thus the cpuidle driver is no longer dependent from arch
  specific code as everything is called from the pm.c file.
 
 Note, this is based on tags/exnos-mcpm and tags/samsung-clk
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTgm6MAAoJEA0Cl+kVi2xqXP0QAJm+Hu8vuwDd5XYzDwsbmzm0
 lm173M2H22ZGT3jDcI77lAwBjoKnJE0Y/+h3Do8hOHtrX08TG9ziUf29dRfV2Vk/
 svrf4i0W9MmB1v23WWomH1qgKWE8OAg7dJO3Snwr4ZvhgzFLirNiCzA2P03TmqWV
 7fRc+Yauv+6+WkZGAhEqxC5sza+gAdyQarhoBVOB/cK3CVDfh1b31SMvWonnKwAW
 676mGU5AdjETiUZZ9eA0Dhh3r1lSyyXmWUtdtDYulhyMt0uHdiJSir5tt9Elt1n3
 i7jjNxyVe78WWe9sFd1xZBCuDH3gdVlYGHpmV35NXA8yOGs6XQju5bKh8LHOejoH
 LaK9kzITdFo4GIJZpmmk/lx+c8EwL/bF1w6+FKrDWoKidv4bpYaRPIBMUqebSZb+
 jGrC5ox5TzURGRUZ27iszePgcTcOEMWhPyUjr5yarL9r8Czhdmyl7S01jyrRAyNm
 6FLl7yL1BXdk2qPk56ke9Ce7md0Db/nJ5l0fqWOy0TrOYAfGM0H4EMeP6GrfOXXi
 wVIPOoUtH23kjCoazE2hgULCinwUPQ1SLnvNANnL0uFO1AJBqeAT2/n26ssXGA1I
 0qg+6ULMZe8v1byxwmvAZxixTERZHxbrIBUgpkukf2mqSFRJURgm0aNDQJORkysQ
 QnFRo+kmDXqJbPpBbUkw
 =RacH
 -----END PGP SIGNATURE-----

Merge tag 'exynos-cpuidle' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers

Merge "Samsung exynos-cpuidle updates for v3.16" from Kukjin Kim:

- From Daniel Lezcano:
 This patchset relies on the cpm_pm notifier to initiate the
 powerdown sequence operations from pm.c instead cpuidle.c.
 Thus the cpuidle driver is no longer dependent from arch
 specific code as everything is called from the pm.c file.

* tag 'exynos-cpuidle' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (94 commits)
  ARM: EXYNOS: Fix kernel panic when unplugging CPU1 on exynos
  ARM: EXYNOS: Move the driver to drivers/cpuidle directory
  ARM: EXYNOS: Cleanup all unneeded headers from cpuidle.c
  ARM: EXYNOS: Pass the AFTR callback to the platform_data
  ARM: EXYNOS: Move S5P_CHECK_SLEEP into pm.c
  ARM: EXYNOS: Move the power sequence call in the cpu_pm notifier
  ARM: EXYNOS: Move the AFTR state function into pm.c
  ARM: EXYNOS: Encapsulate the AFTR code into a function
  ARM: EXYNOS: Disable cpuidle for exynos5440
  ARM: EXYNOS: Encapsulate boot vector code into a function for cpuidle
  ARM: EXYNOS: Pass wakeup mask parameter to function for cpuidle
  ARM: EXYNOS: Remove ifdef for scu_enable in pm
  ARM: EXYNOS: Move scu_enable in the cpu_pm notifier
  ARM: EXYNOS: Use the cpu_pm notifier for pm
  ARM: EXYNOS: Fix S5P_WAKEUP_STAT call for cpuidle
  ARM: EXYNOS: Move some code inside the idle_finisher for cpuidle
  ARM: EXYNOS: Encapsulate register access inside a function for pm
  ARM: EXYNOS: Change function name prefix for cpuidle
  ARM: EXYNOS: Use cpuidle_register
  ARM: EXYNOS: Prevent forward declaration for cpuidle
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-29 11:21:13 -07:00
Olof Johansson f48d5be2c3 Samsung clock updates for 3.16
In this time, it is having dependency with arch/arm/ for 3.16,
 I pulled them into samsung tree from Tomasz under agreement from Mike.
 
 - Pull for_3.16/exynos5260 from Tomasz Figa:
 
   "This pull request contains patches preparing Samsung Common Clock Framework
   helpers to support Exynos5260 by adding support for multiple clock providers
   and then adding clock driver for Exynos5260."
 
 - Pull for_3.16/clk_fixes_non_critical from Tomasz Figa:
 
   "This pull requests contains a number of non-critical fixes for Samsung clock
   framework and drivers, including:
   1) a series of fixes for Exynos5420 to correct clock definitions and make the
   driver closer to the documentation,
   2) several missing clocks and clock IDs added to Exynos4, Exynos5250 and
   Exynos5420 drivers,
   3) fix for incorrect initialization of clock table with NULL,
   4) compiler warning fix."
 
 - Pull for_3.16/clk_cleanup from Tomasz Figa:
 
   "This pull requests contains minor clean-up related to Samsung clock
   support, including:
   1) move Kconfig entries of Samsung clock drivers to drivers/clk,
   2) compile drivers/clk/samsung conditionally when COMMON_CLK_SAMSUNG is
   selected,
   3) remove obsolete Kconfig lines after moving s3c24xx to CCF."
 
 - Pull for_3.16/exynos3250 from Tomasz Figa:
 
   "This small pull request contains a patch adding clock driver for Exynos3250,
   which depends on previous pull requests in this series."
 
 - add dt bindings for exynos3250 clock
 - add exynos5800 specific clocks in current exynos5420 clock
 
 Note that this branch is based on s3c24xx ccf branch
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTeoa3AAoJEA0Cl+kVi2xqSEgP/0FBT5Hz6aYmTs32Rs4fnPz/
 232dV6GEWXLPWnxZNlRo4YlaLT0ZOU+BW17iWln5AnoqEEIwQjezMcDoQm0W7Di9
 6gcocX58i7O319Bi6zgCeO1cN+0eo9GuIOX1gD7YghblKNcvx1JnEZ+lriFMSDZw
 hM2nTk2JWTLniD6qlU/yf/sdJJI3O37QOgMnccXkzU/PFvNc2/8JYIZJ4FrfalMC
 dYmy52QtvKl3vkxvCliVGhyZBm736G3rxkh4hgdI2pczBs6EkH7X7EuqngIaDGZ0
 P+5SVcNEbUSWvtvHWRKK1DXv5IaSotfRciEX7OYqssJtQQa0P/MhtvhXCURHzxc4
 WxpcPdHha6bHTMAAWtGEuRQ6ReuBGl88gvKWIMfYEK1+8vt1z0c3W3RzJ1hQ0mJ6
 oRJA4CAhD9OW/vQaF0LwRPVEZGnPgkohN7Skp/25cKx0wkEQ9zDrSC0sm6jyJy9Y
 d0lzsHJY+QRED2luvfSMcwC1xRX1W7w8Qs10rAgExU6zE3Um37nq1MWhx1Ep6GMp
 F90mWsNzCfSv4w34i8U8Gy4BZCSpMo8U7z/ivQokAzM1c+mCbL5+teAt1WDbsTL2
 Ythah64USFdtU56zzaVr6nLis1ASyfhkQSHDc/r9C3CxGMrdji6Tx41Sp8Z1+Mt9
 Y+7h4J//YO+lHPEfi8OR
 =PqTJ
 -----END PGP SIGNATURE-----

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

Merge "Samsung clock updates for 3.16" from Kukjin Kim:

In this time, it is having dependency with arch/arm/ for 3.16,
I pulled them into samsung tree from Tomasz under agreement from Mike.

- Pull for_3.16/exynos5260 from Tomasz Figa:

  "This pull request contains patches preparing Samsung Common Clock Framework
  helpers to support Exynos5260 by adding support for multiple clock providers
  and then adding clock driver for Exynos5260."

- Pull for_3.16/clk_fixes_non_critical from Tomasz Figa:

  "This pull requests contains a number of non-critical fixes for Samsung clock
  framework and drivers, including:
  1) a series of fixes for Exynos5420 to correct clock definitions and make the
  driver closer to the documentation,
  2) several missing clocks and clock IDs added to Exynos4, Exynos5250 and
  Exynos5420 drivers,
  3) fix for incorrect initialization of clock table with NULL,
  4) compiler warning fix."

- Pull for_3.16/clk_cleanup from Tomasz Figa:

  "This pull requests contains minor clean-up related to Samsung clock
  support, including:
  1) move Kconfig entries of Samsung clock drivers to drivers/clk,
  2) compile drivers/clk/samsung conditionally when COMMON_CLK_SAMSUNG is
  selected,
  3) remove obsolete Kconfig lines after moving s3c24xx to CCF."

- Pull for_3.16/exynos3250 from Tomasz Figa:

  "This small pull request contains a patch adding clock driver for Exynos3250,
  which depends on previous pull requests in this series."

- add dt bindings for exynos3250 clock
- add exynos5800 specific clocks in current exynos5420 clock

Note that this branch is based on s3c24xx ccf branch

* tag 'samsung-clk' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (59 commits)
  clk: exynos5420: Add 5800 specific clocks
  dt-bindings: add documentation for Exynos3250 clock controller
  ARM: S3C24XX: fix merge conflict
  clk: samsung: exynos3250: Add clocks using common clock framework
  drivers: clk: use COMMON_CLK_SAMSUNG for Samsung clock support
  ARM: S3C24XX: move S3C24XX clock Kconfig options to Samsung clock Kconfig file
  ARM: select COMMON_CLK_SAMSUNG for ARCH_EXYNOS and ARCH_S3C64XX
  clk: samsung: add new Kconfig for Samsung common clock option
  ARM: S3C24XX: Remove omitted Kconfig selects and conditionals
  clk: samsung: exynos5420: add more registers to restore list
  clk: samsung: exynos5420: add misc clocks
  clk: samsung: exynos5420: update clocks for MAU Block
  clk: samsung: exynos5420: fix register offset for sclk_bpll
  clk: samsung: exynos5420: correct sysmmu-mfc parent clocks
  clk: samsung: exynos5420: update clocks for FSYS and FSYS2 blocks
  clk: samsung: exynos5420: update clocks for WCORE block
  clk: samsung: exynos5420: update clocks for PERIS and GEN blocks
  clk: samsung: exynos5420: update clocks for PERIC block
  clk: samsung: exynos5420: update clocks for DISP1 block
  clk: samsung: exynos5420: update clocks for G2D and G3D blocks
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-29 11:16:11 -07:00
Olof Johansson dca092f6d4 Exynos MCPM support for v3.16
- adding MCPM backend support for SMP secondary boot and core switching
 on Samsung's Exynos5420.
 
 Tested on exynos5420-smdk5420 and exynos5420 based chromebook (peach-pit)
 using the "/dev/b.L_switcher" user interface. Secondary core boot-up has
 also been tested on both the boards.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTeo2RAAoJEA0Cl+kVi2xqynAQAInNHE2zWbOj/h9VcOV4+Upt
 VTobcgMiwEKZ530vkW3dq0acs24M6BU/OEBDP9qCPKG5q9qdjQcmiIlwjmzWiPJM
 VBi05exFXAxcaOmj4SBl0rkFCHrpKu64B0YJrjKZz/zK9A1QN03kkYe8EYRnuwsH
 w3FN61JX/S+4MBvdgDL1KAvciHoZvNjhrsOFfY24+0vAMaQzWVhps49Tkg675MHO
 rZw9VV8nv0uJmOgFc8XnmlUe1DVTUHjBbCPC6Sy0H3H5DXzuMQOW1Y+qL0DLR9NJ
 bZDPYVaqpYK2cWvXqjqSNJz3sNpZhrWZi4BrVdnmWSlzuLSF8/DZom4gv+SNnd8+
 DrvP/4wqGTzuhWq/gr+9T+/Lz2qzlyr8dGy86ohtBLwMocYwpufaEqU7iKIOxCrb
 IlpkM5EcstHKnSr8QinehVPGp8N1PqJDympYOgFb3hPDIDbKktNU2Wwgr4CDBN30
 Qypd3+fHwU2SJtK34L5/+hDmxwQwB5gnpPbc//7Ir1Ld3ZTEXv9sn5Rtv0EXFK1E
 Xx/C4B+2COi3IGbELqyS1ax4twJr/t1EwxjZgQZO1LT2B9CtQeKKdrG/IpI+J6wL
 9qjIRv4i0tICkGXyu/wwwhLAHqpDQ+FebWAqM3llpIcoTjBy3BOdjZ+C2R0mkS94
 X2dRzKw0dswv8GpBTAYm
 =d5ZP
 -----END PGP SIGNATURE-----

Merge tag 'exynos-mcpm' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc

Merge "Exynos MCPM support for v3.16" from Kukjin Kim:

- adding MCPM backend support for SMP secondary boot and core switching
on Samsung's Exynos5420.

Tested on exynos5420-smdk5420 and exynos5420 based chromebook (peach-pit)
using the "/dev/b.L_switcher" user interface. Secondary core boot-up has
also been tested on both the boards.

* tag 'exynos-mcpm' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Add MCPM call-back functions
  ARM: dts: add CCI node for exynos5420
  ARM: EXYNOS: Add generic cluster power control functions
  ARM: EXYNOS: use generic exynos cpu power control functions
  ARM: EXYNOS: Add generic cpu power control functions for exynos SoCs

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-29 09:48:55 -07:00
Olof Johansson 81d1d392f3 Samsung 2nd DT updates for v3.16
- exynos4
   : add hsotg device, exynos_usbphy nodes
   : add PMU syscon and audio subsystem nodes
   : replace number by macro in clock binding
 
 - exynos4210-universal_c210
  : add external sd card node and multimedia nodes
  : enable USB functionality
 
 - exynos4412-trats2
  : enable usb nodes and usb gagdet functionality
  : add cm36651 light/proximity sensor node
  : fixed gpio key node
 
 - exynos5250 and exynos5420
   : add pmu syscon handle and sysreg system controller nodes
   : add support for usb2phy
   : replace number by macro in clock binding
   : add USB 2.0 support on exynos5420
 
 - exynos5420-peach-pit
   : move dp hpd gpio pin to pinctrl_0
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTgm1wAAoJEA0Cl+kVi2xqfvoP/jTHjQhyccDTHA6B3UJ6fi3Q
 NvVP67P1QrLHmzq66ZA08Db13pWHl+7jsS/nFJiX2/5tfMP1ISoZXcAZ3hDORqiS
 0R3V3UBLFblHAu4SZMiCLHV//gpMTHDG1FrA/p9s7m89w+3P5AVNlG+f/mfGzkb3
 vm5g5YMiAzyy5Mw2daMPtzbuEHt9htZpkh2DaT17dc+ej0bjBmEqEk/fmCHYPSYd
 d5u7zf69vV4MaE4duYNmOqnzI3YBOIWHYUjpCZVKX1qU7+dfXB20mb+HcbF8LMbS
 MyzwGNgpcvPx94K2OZU8rg5frErjucD5XRITGkEv0C7Z80uQLUDz7T3Mzmpc1duN
 F0rEOSBKOiIuDcEMgUYjnQPTw1RwqcR4TcXSFyntt3bD0EWI5ZcKrrOuupHc1Q/J
 +q4MUJrHuOhFZh/nzP/UrHQqbwBkkHYO9CUoUWtDYotbZH3b9aX+ZP3pD0naDMIl
 iCj+CU8o+sKZFnBICyAfGzJg7t7MSJ9ZhQ3a/2T8xWTiN06jmVNj2FxsVCpaK4oH
 sP1StBtwPq6d6c4GyU+w7EAnXiZ17ZdIIFYOgGj0yhsuIgJ14vacOSw0lIAaoKsT
 Eo6NgFIcnHbbKyXZQlwBDKsiQ89fC2RO8A3LSOoH+XutGMk7gxcXdpAYe1YaWdeE
 v/f+i6QATirHZeLW6Ue/
 =QihP
 -----END PGP SIGNATURE-----

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

Merge "Samsung 2nd DT updates for v3.16" from Kukjin Kim:

exynos4
 - add hsotg device, exynos_usbphy nodes
 - add PMU syscon and audio subsystem nodes
 - replace number by macro in clock binding

exynos4210-universal_c210
 - add external sd card node and multimedia nodes
 - enable USB functionality

exynos4412-trats2
 - enable usb nodes and usb gagdet functionality
 - add cm36651 light/proximity sensor node
 - fixed gpio key node

exynos5250 and exynos5420
 - add pmu syscon handle and sysreg system controller nodes
 - add support for usb2phy
 - replace number by macro in clock binding
 - add USB 2.0 support on exynos5420

exynos5420-peach-pit
 - move dp hpd gpio pin to pinctrl_0

* tag 'samsung-dt-2' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (21 commits)
  ARM: dts: enable usb nodes for exynos4412-trats2
  ARM: dts: add hsotg device node for exynos4
  ARM: dts: add exynos_usbphy node for exynos4
  ARM: dts: add PMU syscon node for exynos4
  ARM: dts: add pmu syscon handle to exynos5420 hdmi
  ARM: dts: add pmu syscon handle to exynos5250 hdmi
  ARM: dts: replace number by macro in clock binding for exynos5420
  ARM: dts: replace number by macro in clock binding for exynos5250
  ARM: dts: replace number by macro in clock binding for exynos4
  ARM: dts: add external sd card node for exynos4210-universal_c210
  ARM: dts: add multimedia nodes for exynos4210-universal_c210
  ARM: dts: enable USB functionality for exynos4210-universal_c210
  ARM: dts: Enable USB gadget functionality for exynos4210-trats
  ARM: dts: Add audio subsystem nodes to exynos4.dtsi
  ARM: dts: fixed gpio key node for exynos4412-trats2
  ARM: dts: add cm36651 light/proximity sensor node for exynos4412-trats2
  ARM: dts: Add USB 2.0 support on exynos5420
  ARM: dts: Add usb2phy support on exynos5420
  ARM: dts: Add usb2phy to exynos5250
  ARM: dts: Add sysreg sytem controller node to exynos5250 and exynos5420
  ...
2014-05-29 09:44:32 -07:00
Olof Johansson a52d35c92d Samsung cleanup for v3.16
- use a common macro v7_exit_coherency_flush macro instead of local function
 - cleanup mach-exynos/Makefile and remove inclusion plat/cpu.h in mach-exynos
 - migrate exynos macros from plat-samsung to mach-exynos
 - cleanup s3c24xx debug macro/earlyprintk to remove arch dependency
 - fixed compilation error for cpufreq due to moving header in this branch
   : use of_machine_is_compatible() instead of soc_is_exynos...()
 
 Note that based on tags/samsung-clk and tags/samsung-fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTgmooAAoJEA0Cl+kVi2xqvssQAIABfrljDPGkWlKMK0LClBMW
 8Pq6n8wwbIhOJMvJjY1zvUA/6gvyWMmvPwlF23LWSKRsfGlH8xWNP9rLAamqsKyo
 G/rPfSDDyL2iqH7CMdFaDPb8hgmvCNuW6pgBQ06OZRqTNbgNa/FABw5+ZdOiT/kD
 Tf5OzVyD1KKcHxkOU8GoggLQsUHPGbsK9L9NmxWpKfpkuLzbMYHwgVhVsAfMqF4x
 dqls9+/+npvP5V4PFbavIH1/XW7rXxj7QVAvT8Cr+0UrLlkfrJc7/F+7GA6n9+AD
 7tOMf9Vm2Z39dvfdTHqmxAj04X8Ps6wr7N4y1ZPSTOe9AaqZb7MA/yspwTU9UxuT
 0ASavDA/pPwZnw+IhBlhkv4pYVbggn38VrzkaTTRCJ61jQfyf15tNSW/S0DmE0bx
 jGILG2p0JwxIRsymdZ9hdCKlr878nFB7F3zfrvrIk/4BShySVNh6bv4rd7KSteE2
 9PPr1cDW73R0bthoklh437jC/EVa5dlQBhZBV3lC0AXxSkU3LM4IUjIy1VPLredk
 3vcBMOgjU71tJQFakpGiclSlKTT3qZirO26+t9WIMryI5OhY0RGjG5GHFn9v8IFU
 rOJ7cyzQYYH3XH0wqCdmZ8vs0UPdMHB5EN5V/sVeb7p4FwJK/9Xi5it/O5BPoL0p
 +omq+5B3ZDDqz1kC8Twm
 =zkqB
 -----END PGP SIGNATURE-----

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

Merge "Samsung cleanup for v3.16" from Kukjin Kim:

- use a common macro v7_exit_coherency_flush macro instead of local function
- cleanup mach-exynos/Makefile and remove inclusion plat/cpu.h in mach-exynos
- migrate exynos macros from plat-samsung to mach-exynos
- cleanup s3c24xx debug macro/earlyprintk to remove arch dependency
- fixed compilation error for cpufreq due to moving header in this branch
  : use of_machine_is_compatible() instead of soc_is_exynos...()

Note that based on tags/samsung-clk and tags/samsung-fixes.

* tag 'samsung-cleanup' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  cpufreq: exynos: Fix the compile error
  ARM: S3C24XX: move debug-macro.S into the common space
  ARM: S3C24XX: use generic DEBUG_UART_PHY/_VIRT in debug macro
  ARM: S3C24XX: trim down debug uart handling
  ARM: compressed/head.S: remove s3c24xx special case
  ARM: EXYNOS: Remove unnecessary inclusion of cpu.h
  ARM: EXYNOS: Migrate Exynos specific macros from plat to mach
  ARM: EXYNOS: Remove exynos_subsys registration
  ARM: EXYNOS: Remove duplicate lines in Makefile
  ARM: EXYNOS: use v7_exit_coherency_flush macro for cache disabling
  ARM: dts: Remove g2d_pd node for exynos5420
  ARM: dts: Remove mau_pd node for exynos5420
  ARM: exynos_defconfig: enable HS-I2C to fix for mmc partition mount
  ARM: dts: disable MDMA1 node for exynos5420
  ARM: EXYNOS: fix the secondary CPU boot of exynos4212

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-29 09:40:51 -07:00
Kumar Gala 15ce39ade2 ARM: qcom: Enable GSBI driver in defconfig
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-05-29 11:27:03 -05:00
Georgi Djakov f46d23f6f3 ARM: dts: qcom: Add APQ8084-MTP board support
Add device-tree file for APQ8084-MTP board, which belongs
to the Snapdragon 805 family.

Signed-off-by: Georgi Djakov <gdjakov@mm-sol.com>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-05-29 11:16:45 -05:00
Georgi Djakov 975fd0f6c3 ARM: dts: qcom: Add APQ8084 SoC support
Add support for the Qualcomm Snapdragon 805 APQ8084 SoC. It is
used on APQ8084-MTP and other boards.

Signed-off-by: Georgi Djakov <gdjakov@mm-sol.com>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-05-29 11:16:33 -05:00
Georgi Djakov 2f528dd3b3 ARM: debug: qcom: add UART addresses to Kconfig help for APQ8084
Add information about the APQ8084 debug UART physical and virtual
addresses in the DEBUG_QCOM_UARTDM Kconfig help section.

Signed-off-by: Georgi Djakov <gdjakov@mm-sol.com>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-05-29 11:14:28 -05:00
Kumar Gala f335b8af4f ARM: dts: qcom: Add initial APQ8064 SoC and IFC6410 board device trees
Add basic APQ8064 SoC include device tree and support for basic booting on
the IFC6410 board.  Also, keep dtb build list and qcom_dt_match in sorted
order.

Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-05-29 10:39:07 -05:00
Kumar Gala 66a6c3175f ARM: dts: qcom: Update msm8660 device trees
* Move SoC peripherals into an SoC container node
* Move serial enabling into board file (qcom-msm8660-surf.dts)
* Cleanup cpu node to match binding spec, enable-method and compatible
  should be per cpu, not part of the container
* Add GSBI node and configuration of GSBI controller

Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-05-29 10:35:04 -05:00
Kumar Gala 665c9c03f6 ARM: dts: qcom: Update msm8960 device trees
* Move SoC peripherals into an SoC container node
* Move serial enabling into board file (qcom-msm8960-cdp.dts)
* Cleanup cpu node to match binding spec, enable-method and compatible
  should be per cpu, not part of the container
* Drop interrupts property from l2-cache node as its not part of the
  binding spec
* Add GSBI node and configuration of GSBI controller

Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-05-29 10:35:00 -05:00
Will Deacon ceb218359d arm64: mm: fix pmd_write CoW brokenness
Commit 9c7e535fcc ("arm64: mm: Route pmd thp functions through pte
equivalents") changed the pmd manipulator and accessor functions to
convert the target pmd to a pte, process it with the pte functions, then
convert it back. Along the way, we gained support for PTE_WRITE, however
this is completely ignored by set_pmd_at, and so we fail to set the
PMD_SECT_RDONLY for PMDs, resulting in all sorts of lovely failures (like
CoW not working).

Partially reverting the offending commit (by making use of
PMD_SECT_RDONLY explicitly for pmd_{write,wrprotect,mkwrite} functions)
leads to further issues because pmd_write can then return potentially
incorrect values for page table entries marked as RDONLY, leading to
BUG_ON(pmd_write(entry)) tripping under some THP workloads.

This patch fixes the issue by routing set_pmd_at through set_pte_at,
which correctly takes the PTE_WRITE flag into account. Given that
THP mappings are always anonymous, the additional cache-flushing code
in __sync_icache_dcache won't impose any significant overhead as the
flush will be skipped.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Steve Capper <steve.capper@arm.com>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-05-29 11:31:14 +01:00
AKASHI Takahiro 055b1212d1 arm64: ftrace: Add system call tracepoint
This patch allows system call entry or exit to be traced as ftrace events,
ie. sys_enter_*/sys_exit_*, if CONFIG_FTRACE_SYSCALLS is enabled.
Those events appear and can be controlled under
    ${sysfs}/tracing/events/syscalls/

Please note that we can't trace compat system calls here because
AArch32 mode does not share the same syscall table with AArch64.
Just define ARCH_TRACE_IGNORE_COMPAT_SYSCALLS in order to avoid unexpected
results (bogus syscalls reported or even hang-up).

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-05-29 09:08:33 +01:00
AKASHI Takahiro 3711784ece arm64: ftrace: Add CALLER_ADDRx macros
CALLER_ADDRx returns caller's address at specified level in call stacks.
They are used for several tracers like irqsoff and preemptoff.
Strange to say, however, they are refered even without FTRACE.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-05-29 09:08:33 +01:00
AKASHI Takahiro bd7d38dbdf arm64: ftrace: Add dynamic ftrace support
This patch allows "dynamic ftrace" if CONFIG_DYNAMIC_FTRACE is enabled.
Here we can turn on and off tracing dynamically per-function base.

On arm64, this is done by patching single branch instruction to _mcount()
inserted by gcc -pg option. The branch is replaced to NOP initially at
kernel start up, and later on, NOP to branch to ftrace_caller() when
enabled or branch to NOP when disabled.
Please note that ftrace_caller() is a counterpart of _mcount() in case of
'static' ftrace.

More details on architecture specific requirements are described in
Documentation/trace/ftrace-design.txt.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-05-29 09:08:33 +01:00
AKASHI Takahiro 819e50e25d arm64: Add ftrace support
This patch implements arm64 specific part to support function tracers,
such as function (CONFIG_FUNCTION_TRACER), function_graph
(CONFIG_FUNCTION_GRAPH_TRACER) and function profiler
(CONFIG_FUNCTION_PROFILER).

With 'function' tracer, all the functions in the kernel are traced with
timestamps in ${sysfs}/tracing/trace. If function_graph tracer is
specified, call graph is generated.

The kernel must be compiled with -pg option so that _mcount() is inserted
at the beginning of functions. This function is called on every function's
entry as long as tracing is enabled.
In addition, function_graph tracer also needs to be able to probe function's
exit. ftrace_graph_caller() & return_to_handler do this by faking link
register's value to intercept function's return path.

More details on architecture specific requirements are described in
Documentation/trace/ftrace-design.txt.

Reviewed-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-05-29 09:08:08 +01:00
AKASHI Takahiro af64d2aa87 ftrace: Add arm64 support to recordmcount
Recordmcount utility under scripts is run, after compiling each object,
to find out all the locations of calling _mcount() and put them into
specific seciton named __mcount_loc.
Then linker collects all such information into a table in the kernel image
(between __start_mcount_loc and __stop_mcount_loc) for later use by ftrace.

This patch adds arm64 specific definitions to identify such locations.
There are two types of implementation, C and Perl. On arm64, only C version
is used to build the kernel now that CONFIG_HAVE_C_RECORDMCOUNT is on.
But Perl version is also maintained.

This patch also contains a workaround just in case where a header file,
elf.h, on host machine doesn't have definitions of EM_AARCH64 nor
R_AARCH64_ABS64. Without them, compiling C version of recordmcount will
fail.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-05-29 09:04:31 +01:00
AKASHI Takahiro 26e2ae3999 arm64: Add 'notrace' attribute to unwind_frame() for ftrace
walk_stackframe() calls unwind_frame(), and if walk_stackframe() is
"notrace", unwind_frame() should be also "notrace".

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-05-29 09:04:31 +01:00
AKASHI Takahiro 26e9b83a7d arm64: add __ASSEMBLY__ in asm/insn.h
Since insn.h is indirectly included in asm/entry-ftrace.S,
we need to exclude some declarations by __ASSEMBLY__.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-05-29 09:04:31 +01:00
Bjorn Helgaas fdaf36bd36 Merge branch 'pci/misc' into next
* pci/misc:
  PCI: Fix return value from pci_user_{read,write}_config_*()
  PCI: Turn pcibios_penalize_isa_irq() into a weak function
  PCI: Test for std config alias when testing extended config space
2014-05-28 16:21:25 -06:00
Bjorn Helgaas d1a2523d2a Merge branches 'pci/hotplug', 'pci/pci_is_bridge' and 'pci/virtualization' into next
* pci/hotplug:
  PCI: cpqphp: Fix possible null pointer dereference
  NVMe: Implement PCIe reset notification callback
  PCI: Notify driver before and after device reset

* pci/pci_is_bridge:
  pcmcia: Use pci_is_bridge() to simplify code
  PCI: pciehp: Use pci_is_bridge() to simplify code
  PCI: acpiphp: Use pci_is_bridge() to simplify code
  PCI: cpcihp: Use pci_is_bridge() to simplify code
  PCI: shpchp: Use pci_is_bridge() to simplify code
  PCI: rpaphp: Use pci_is_bridge() to simplify code
  sparc/PCI: Use pci_is_bridge() to simplify code
  powerpc/PCI: Use pci_is_bridge() to simplify code
  ia64/PCI: Use pci_is_bridge() to simplify code
  x86/PCI: Use pci_is_bridge() to simplify code
  PCI: Use pci_is_bridge() to simplify code
  PCI: Add new pci_is_bridge() interface
  PCI: Rename pci_is_bridge() to pci_has_subordinate()

* pci/virtualization:
  PCI: Introduce new device binding path using pci_dev.driver_override

Conflicts:
	drivers/pci/pci-sysfs.c
2014-05-28 16:21:07 -06:00
Bjorn Helgaas 79d458bf47 Merge branches 'pci/host-exynos', 'pci/host-rcar' and 'pci/amd-numa' into next
* pci/host-exynos:
  PCI: exynos: Remove unnecessary OOM messages

* pci/host-rcar:
  PCI: rcar: Add gen2 device tree support
  PCI: rcar: Add R-Car PCIe device tree bindings
  PCI: rcar: Add MSI support for PCIe
  PCI: rcar: Add Renesas R-Car PCIe driver
  PCI: rcar: Use new OF interrupt mapping when possible

* pci/amd-numa:
  x86/PCI: Clean up and mark early_root_info_init() as deprecated
  x86/PCI: Work around AMD Fam15h BIOSes that fail to provide _PXM
  x86/PCI: Warn if we have to "guess" host bridge node information
2014-05-28 16:16:27 -06:00
Christopher Covington 4061f4987b ARM: tty: Move HVC DCC assembly to arch/arm
Put architecture-specific assembly code where it belongs,
allowing for support of additional architectures such as arm64 in
the future.

Signed-off-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 13:33:18 -07:00
Richard Genoud e0b0baadb7 tty/serial: at91: use mctrl_gpio helpers
On sam9x5, dedicated CTS (and RTS) pins are unusable together with the
LCDC, the EMAC, or the MMC because they share the same line.

Moreover, the USART controller doesn't handle DTR/DSR/DCD/RI signals,
so we have to control them via GPIO.

This patch permits to use GPIOs to control the CTS/RTS/DTR/DSR/DCD/RI
signals.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 12:49:44 -07:00
Richard Genoud fa3909320c ARM: at91: gpio: implement get_direction
This is needed for gpiod_get_direction().
Otherwise, it returns -EINVAL.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 12:44:32 -07:00
Kumar Gala ba08220aa8 ARM: dts: qcom: Update msm8974/apq8074 device trees
* Move SoC peripherals into an SoC container node
* Move serial enabling into board file (qcom-apq8074-dragonboard.dts)
* Move spi pinctrl into board file
* Cleanup cpu node to match binding spec, enable-method and compatible
  should be per cpu, not part of the container
* Drop interrupts property from l2-cache node as its not part of the
  binding spec
* Move timer node out of SoC container

Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-05-28 13:31:45 -05:00
Will Deacon 2eb8b396dc Merge branch 'ftrace/arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into for-next/core
Core ftrace changes from Steve Rostedt, required by the arm64 support
code.
2014-05-28 18:29:23 +01:00
Tony Lindgren 43369f0fe8 Merge branch 'for-v3.16/clk-dt' of https://github.com/t-kristo/linux-pm into omap-for-v3.16/dt-v2 2014-05-28 10:14:48 -07:00
Greg Kroah-Hartman 7ca22cfa0f USB: remove CONFIG_USB_DEBUG from defconfig files
Now that CONFIG_USB_DEBUG is gone, remove it from a number of defconfig
files that were enabling it.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 09:40:45 -07:00
Rob Herring 728dd198aa Merge branch 'earlycon-dt' into for-next 2014-05-28 11:23:39 -05:00
Nicolas Pitre 3f8517e793 ARM: 8063/1: bL_switcher: fix individual online status reporting of removed CPUs
The content of /sys/devices/system/cpu/cpu*/online  is still 1 for those
CPUs that the switcher has removed even though the global state in
/sys/devices/system/cpu/online is updated correctly.

It turns out that commit 0902a9044f ("Driver core: Use generic
offline/online for CPU offline/online") has changed the way those files
retrieve their content by relying on on the generic attribute handling
code.  The switcher, by calling cpu_down() directly, bypasses this
handling and the attribute value doesn't get updated.

Fix this by calling device_offline()/device_online() instead.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-28 16:33:02 +01:00
Linus Torvalds 4efdedca93 Small fixes for x86, slightly larger fixes for PPC, and a forgotten s390 patch.
The PPC fixes are important because they fix breakage that is new in 3.15.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTdivEAAoJEBvWZb6bTYbyw3YQAIILnflhHNtklj1mfPnnibQf
 c3BLCkJ0gtK6A0FO2aAHgSja0kpgbEEnSphE/A/cb0vkLon3n5O0pQoSKjGUUbBO
 Mo0ndjzBYNmCP4MGxhkrg49VdqD40NaR0BjJAZudb4vUOw892WLFIJMIVmIqs9eG
 8V/y6S7mPLmrooAKHZxXql9y30UC77T1VZ3r4pXwYgKtUT51BQfTyWiSfjQBa8yI
 oGOSb8uqEC7YiOYPJYUNIMsyVqW4E6Qqs46rqtP4XZmSxzWXDzzgP4nQHHyJJCdZ
 aBYkeG+sJZG7ZwleJLejAncjWUY9Oq9GkMYNj0cTAoP/zA6jBGAll96KGKRbes9z
 bZUtCNL3ifLcgbIGeAxgjmYOq0XLGahHbqm9QISYW2XdRkBI+8EJs5FCP4YEHzZn
 FSm3zcCQ+wtbqjBbZZcqqLa6A/CGzjyO26qz+BCxrZ0BQkQX/2am3UykQ0JWam3H
 vX5ZM2ewJhs6SjFisPcswd20AN+SHjPyzPvErBLDfrqnAVbwj2ehgqyN2slVsqrj
 UyGzeKCfJgA0TiEH/4K6j6hvQWynUU+/2JglIfGE6AXmWddazCzl/qx4LvuGKFoB
 b8JSQ7YaHSsq/tHc8WhHkvcP0FSDZEiHcJN2iY1pwLKTSQp9JN3aPNruPKiO8dsW
 N+LoHL5fFcDi6Uu6wS7w
 =E2fU
 -----END PGP SIGNATURE-----

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

Pull kvm fixes from Paolo Bonzini:
 "Small fixes for x86, slightly larger fixes for PPC, and a forgotten
  s390 patch.  The PPC fixes are important because they fix breakage
  that is new in 3.15"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: s390: announce irqfd capability
  KVM: x86: disable master clock if TSC is reset during suspend
  KVM: vmx: disable APIC virtualization in nested guests
  KVM guest: Make pv trampoline code executable
  KVM: PPC: Book3S: ifdef on CONFIG_KVM_BOOK3S_32_HANDLER for 32bit
  KVM: PPC: Book3S HV: Add missing code for transaction reclaim on guest exit
  KVM: PPC: Book3S: HV: make _PAGE_NUMA take effect
2014-05-28 08:08:03 -07:00
Linus Torvalds 9e3d633178 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull two powerpc fixes from Ben Herrenschmidt:
 "Here's a pair of powerpc fixes for 3.15 which are also going to
  stable.

  One's a fix for building with newer binutils (the problem currently
  only affects the BookE kernels but the affected macro might come back
  into use on BookS platforms at any time).  Unfortunately, the binutils
  maintainer did a backward incompatible change to a construct that we
  use so we have to add Makefile check.

  The other one is a fix for CPUs getting stuck in kexec when running
  single threaded.  Since we routinely use kexec on power (including in
  our newer bootloaders), I deemed that important enough"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc, kexec: Fix "Processor X is stuck" issue during kexec from ST mode
  powerpc: Fix 64 bit builds with binutils 2.24
2014-05-28 08:06:50 -07:00
Tero Kristo bc797691de ARM: dts: omap2 clock data
This patch creates a unique node for each clock in the OMAP2 power,
reset and clock manager (PRCM).

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2014-05-28 13:11:36 +03:00
Thomas Bogendoerfer f3f0d95146 MIPS: R46000: Fix Micro-assembler field overflow for R4600 V2
Fix uasm warning, which triggered because of workaround for R4600 V2 CPUs.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6716/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-05-28 11:08:14 +02:00
Alex Smith 57c7ea513f MIPS: ptrace: Avoid smp_processor_id() in preemptible code
ptrace_{get,set}_watch_regs access current_cpu_data to get the watch
register count/masks, which calls smp_processor_id(). However they are
run in preemptible context and therefore trigger warnings like so:

[ 6340.092000] BUG: using smp_processor_id() in preemptible [00000000] code: gdb/367
[ 6340.092000] caller is ptrace_get_watch_regs+0x44/0x220

Since the watch register count/masks should be the same across all
CPUs, use boot_cpu_data instead. Note that this may need to change in
future should a heterogenous system be supported where the count/masks
are not the same across all CPUs (the current code is also incorrect
for this scenario - current_cpu_data here would not necessarily be
correct for the CPU that the target task will execute on).

Signed-off-by: Alex Smith <alex.smith@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6879/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-05-28 10:54:41 +02:00
Sebastian Andrzej Siewior f02ffb199d MIPS: Lemote 2F: cs5536: mfgpt: use raw locks
The lock is taken in the raw irq path and therefore a rawlock should be
used instead of a normal spinlock.
While here I drop the export symbol on that variable since there are no
other users.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-mips@linux-mips.org
Cc: Hua Yan <yanh@lemote.com>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Alex Smith <alex.smith@imgtec.com>
Cc: Hongliang Tao <taohl@lemote.com>
Cc: Wu Zhangjin <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/6936/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-05-28 10:48:26 +02:00
Martin Schwidefsky 63aef00b55 s390/lowcore: replace lowcore irb array with a per-cpu variable
Remove the 96-byte irb array from the lowcore and create a per-cpu
variable instead. That way we will pick up any change in the definition
of the struct irb automatically.

Acked-By: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-05-28 10:39:16 +02:00
Christian Borntraeger 993072ee67 s390/lowcore: reserve 96 bytes for IRB in lowcore
The IRB might be 96 bytes if the extended-I/O-measurement facility is
used. This feature is currently not used by Linux, but struct irb
already has the emw defined. So let's make the irb in lowcore match the
size of the internal data structure to be future proof.
We also have to add a pad, to correctly align the paste.

The bigger irb field also circumvents a bug in some QEMU versions that
always write the emw field on test subchannel and therefore destroy the
paste definitions of this CPU. Running under these QEMU version broke
some timing functions in the VDSO and all users of these functions,
e.g. some JREs.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: stable@vger.kernel.org
2014-05-28 10:38:59 +02:00
Heiko Carstens 6eb58d9bc1 s390/facilities: remove extract-cpu-time facility check
Remove the check for the extract-cpu-time facility within early startup
code. Both kernel and user space work if the facility is not installed.

The vdso code has a run time check if the ectg is available. Besides that
there is no known user.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-05-28 10:38:50 +02:00
Fabian Frederick e8d6dc5ad2 m68k/hp300: Convert printk to pr_foo()
This patch also fixes some checkpatch warnings

This is untested

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:11:55 +02:00
Fabian Frederick ce00aa0a72 m68k/apollo: Convert printk to pr_foo()
no level printk converted to pr_info

This is untested

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:11:55 +02:00
Fabian Frederick f296401b04 m68k/amiga: Convert printk(foo to pr_foo()
-no level printk converted to pr_warn/pr_info
-fixed a small identation problem

This is untested

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:11:54 +02:00
Andreas Schwab 486df8bc46 m68k: Increase initial mapping to 8 or 16 MiB if possible
If the size of the first memory chunk is at least 8 or 16 MiB increase the
initial mapping to 8 resp. 16 MiB instead of 4 MiB.
This makes it possible to
  1. Map more memory in the first node without running out of space for the
     page tables,
  2. Boot kernels that don't fit in 4 MiB (e.g. multi_defconfig).

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>

  - Add support for 8 MiB,
  - Store initial mapping size in head.S for later reuse,
  - Add comment about large kernels.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:11:54 +02:00
Geert Uytterhoeven 44074e892c m68k: Update defconfigs for v3.15-rc2
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:11:53 +02:00
Finn Thain 83adc18110 m68k/atari: fix SCC initialization for debug console
Fix SCC initialization for Atari as was previously fixed for Mac. It's
probably not practical to share more code but some attempt is made to
align the Mac and Atari variants.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:11:53 +02:00
Finn Thain c46f46d02c m68k/mvme16x: Adopt common boot console
In a multi-platform kernel binary we only need one early console instance.

The difficulty here is that the common early console is started by
early_param(), whereas the MVME16x instance is started later by
config_mvme16x(). That means some interrupt setup must be done earlier.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Stephen N Chivers <schivers@csc.com.au>
[Geert] Tag debug_cons_write() with __ref to kill section mismatch warning
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:11:53 +02:00
Finn Thain 7913ad1ad8 m68k: Multi-platform EARLY_PRINTK
Make the boot console available to more m68k platforms by leveraging
the head.S debug console.

The boot console is enabled by the "earlyprintk" command line argument
which is how most other architectures do this.

This is a change of behaviour for the Mac but does not negatively impact
the common use-case which is not debugging.

This is also a change of behaviour for other platforms because it means
the serial port stays quiet when CONFIG_EARLY_PRINTK is not enabled. This
is also an improvement for the common use-case.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Stephen N Chivers <schivers@csc.com.au>
[Geert: CONSOLE_DEBUG should depend on CONFIG_FONT_SUPPORT]
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:10:04 +02:00
Ralf Baechle bb6c0bd3fd MIPS: SB1: Fix excessive kernel warnings.
A kernel build with binutils 2.24 is going to emit warnings like

  CC      kernel/sys.o
{standard input}: Assembler messages:
{standard input}:701: Warning: the 32-bit MIPS architecture does not support the `mdmx' extension
{standard input}:701: Warning: the `mdmx' extension requires 64-bit FPRs
{standard input}:701: Warning: the `mips3d' extension requires MIPS32 revision 2 or greater
{standard input}:701: Warning: the `mips3d' extension requires 64-bit FPRs

for almost every file.  This is caused by changes to gas' interpretation
of .set semantics.  Fixed by explicitly disabling MIPS3D and MDMX for
Sibyte builds.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-05-28 08:42:23 +02:00
Tomi Valkeinen f2dd36ac99 OMAPDSS: move 'compatible' converter to omapdss driver
Move the panel/encoder driver compatible-string converter from
arch/arm/mach-omap2/display.c to omapdss driver. That is a more logical
place for it, as it's really an omapdss internal hack.

The code is rewritten to follow the video node graph, starting from
omapdss. This removes the need to have the device compatible-string
database.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-05-28 09:25:15 +03:00
Kuninori Morimoto 730359857f ARM: shmobile: armadillo800eva: fixup HDMI sound flags setting
c7a507eea1
(ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags)
fixuped FSI driver's behavior
which didn't match to ALSA flags.

But, it didn't care about armadillo800eva HDMI sound flags.
This patch fixed it.

Reported-by: Bui Duc Phuc(Fukuda) <bd-phuc@jinso.co.jp>
Reported-by: Hiep Cao Minh <cm-hiep@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-05-28 12:57:07 +09:00
Srivatsa S. Bhat 011e4b02f1 powerpc, kexec: Fix "Processor X is stuck" issue during kexec from ST mode
If we try to perform a kexec when the machine is in ST (Single-Threaded) mode
(ppc64_cpu --smt=off), the kexec operation doesn't succeed properly, and we
get the following messages during boot:

[    0.089866] POWER8 performance monitor hardware support registered
[    0.089985] power8-pmu: PMAO restore workaround active.
[    5.095419] Processor 1 is stuck.
[   10.097933] Processor 2 is stuck.
[   15.100480] Processor 3 is stuck.
[   20.102982] Processor 4 is stuck.
[   25.105489] Processor 5 is stuck.
[   30.108005] Processor 6 is stuck.
[   35.110518] Processor 7 is stuck.
[   40.113369] Processor 9 is stuck.
[   45.115879] Processor 10 is stuck.
[   50.118389] Processor 11 is stuck.
[   55.120904] Processor 12 is stuck.
[   60.123425] Processor 13 is stuck.
[   65.125970] Processor 14 is stuck.
[   70.128495] Processor 15 is stuck.
[   75.131316] Processor 17 is stuck.

Note that only the sibling threads are stuck, while the primary threads (0, 8,
16 etc) boot just fine. Looking closer at the previous step of kexec, we observe
that kexec tries to wakeup (bring online) the sibling threads of all the cores,
before performing kexec:

[ 9464.131231] Starting new kernel
[ 9464.148507] kexec: Waking offline cpu 1.
[ 9464.148552] kexec: Waking offline cpu 2.
[ 9464.148600] kexec: Waking offline cpu 3.
[ 9464.148636] kexec: Waking offline cpu 4.
[ 9464.148671] kexec: Waking offline cpu 5.
[ 9464.148708] kexec: Waking offline cpu 6.
[ 9464.148743] kexec: Waking offline cpu 7.
[ 9464.148779] kexec: Waking offline cpu 9.
[ 9464.148815] kexec: Waking offline cpu 10.
[ 9464.148851] kexec: Waking offline cpu 11.
[ 9464.148887] kexec: Waking offline cpu 12.
[ 9464.148922] kexec: Waking offline cpu 13.
[ 9464.148958] kexec: Waking offline cpu 14.
[ 9464.148994] kexec: Waking offline cpu 15.
[ 9464.149030] kexec: Waking offline cpu 17.

Instrumenting this piece of code revealed that the cpu_up() operation actually
fails with -EBUSY. Thus, only the primary threads of all the cores are online
during kexec, and hence this is a sure-shot receipe for disaster, as explained
in commit e8e5c2155b (powerpc/kexec: Fix orphaned offline CPUs across kexec),
as well as in the comment above wake_offline_cpus().

It turns out that cpu_up() was returning -EBUSY because the variable
'cpu_hotplug_disabled' was set to 1; and this disabling of CPU hotplug was done
by migrate_to_reboot_cpu() inside kernel_kexec().

Now, migrate_to_reboot_cpu() was originally written with the assumption that
any further code will not need to perform CPU hotplug, since we are anyway in
the reboot path. However, kexec is clearly not such a case, since we depend on
onlining CPUs, atleast on powerpc.

So re-enable cpu-hotplug after returning from migrate_to_reboot_cpu() in the
kexec path, to fix this regression in kexec on powerpc.

Also, wrap the cpu_up() in powerpc kexec code within a WARN_ON(), so that we
can catch such issues more easily in the future.

Fixes: c97102ba96 (kexec: migrate to reboot cpu)
Cc: stable@vger.kernel.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-05-28 13:24:26 +10:00
Guenter Roeck 7998eb3dc7 powerpc: Fix 64 bit builds with binutils 2.24
With binutils 2.24, various 64 bit builds fail with relocation errors
such as

arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
	(.text+0x165ee): relocation truncated to fit: R_PPC64_ADDR16_HI
	against symbol `interrupt_base_book3e' defined in .text section
	in arch/powerpc/kernel/built-in.o
arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
	(.text+0x16602): relocation truncated to fit: R_PPC64_ADDR16_HI
	against symbol `interrupt_end_book3e' defined in .text section
	in arch/powerpc/kernel/built-in.o

The assembler maintainer says:

 I changed the ABI, something that had to be done but unfortunately
 happens to break the booke kernel code.  When building up a 64-bit
 value with lis, ori, shl, oris, ori or similar sequences, you now
 should use @high and @higha in place of @h and @ha.  @h and @ha
 (and their associated relocs R_PPC64_ADDR16_HI and R_PPC64_ADDR16_HA)
 now report overflow if the value is out of 32-bit signed range.
 ie. @h and @ha assume you're building a 32-bit value. This is needed
 to report out-of-range -mcmodel=medium toc pointer offsets in @toc@h
 and @toc@ha expressions, and for consistency I did the same for all
 other @h and @ha relocs.

Replacing @h with @high in one strategic location fixes the relocation
errors. This has to be done conditionally since the assembler either
supports @h or @high but not both.

Cc: <stable@vger.kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-05-28 13:24:05 +10:00
Naoki MATSUMOTO 3a0d89d3f8 USB: delete CONFIG_USB_DEVICEFS from defconfig
It no longer occurs in Kconfig.
USB: remove CONFIG_USB_DEVICEFS(fb28d58b) leaked remove defconfig.

Signed-off-by: Naoki MATSUMOTO <nekomatu+linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-27 16:07:13 -07:00
Hanjun Guo a43ae58c84 PCI: Turn pcibios_penalize_isa_irq() into a weak function
pcibios_penalize_isa_irq() is only implemented by x86 now, and legacy ISA
is not used by some architectures.  Make pcibios_penalize_isa_irq() a
__weak function to simplify the code.  This removes the need for new
platforms to add stub implementations of pcibios_penalize_isa_irq().

[bhelgaas: changelog, comments]
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2014-05-27 16:23:58 -06:00
Pekon Gupta 99ffa6425f ARM: dts: am437x-gp-evm: add support for parallel NAND flash
Adds pinmux and DT node for Micron (MT29F4G08AB) x8 NAND device present on
am437x-gp-evm board.
(1) As NAND Flash data lines are muxed with eMMC, Thus at a given time either
    eMMC or NAND can be enabled. Selection between eMMC and NAND is controlled:
    (a) By dynamically driving following GPIO pin from software
        SPI2_CS0(GPIO) == 0 NAND is selected (default)
        SPI2_CS0(GPIO) == 1 eMMC is selected
    (b) By statically using Jumper (J89) on the board

(2) As NAND device connnected to this board has page-size=4K and oob-size=224,
    So ROM code expects boot-loaders to be flashed in BCH16 ECC scheme for
    NAND boot.

Signed-off-by: Pekon Gupta <pekon@ti.com>
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-05-27 14:22:31 -07:00
Pekon Gupta 2e091d13e6 ARM: OMAP2+: gpmc: enable BCH_HW ecc-scheme for AM43xx platforms
Fixes: commit 0611c41934
ARM: OMAP2+: gpmc: update gpmc_hwecc_bch_capable() for new platforms and ECC schemes

Though the commit log of above commit mentions AM43xx platforms, but code change
missed AM43xx. This patch adds AM43xx to list of those SoC which have built-in
ELM hardware engine, so that BCH ecc-schemes with hardware error-correction can
be enabled on AM43xx devices.

Reported-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-05-27 14:22:30 -07:00
Linus Torvalds 758b67126f ARM: SoC fixes for 3.15
A slightly larger set of fixes than we'd like at this point in the
 release. Hopefully our very last batch before 3.15:
 
  - OMAP:
    * Fix boot regression with CPU_IDLE enabled
    * Fixes for audio playback on OMAP5
    * Clock rate setting fix for OMAP3
    * Misc idle/PM fixes
  - Exynos:
    * Removal of a couple of power domains to work around issues with access
      when they are powered down
    * Enabling missing highspeed-i2c driver to make MMC regulators work
    * Secondary CPU spin-up fix for 4212
    * Remove MDMA1 engine to avoid conflicts on secure mode platforms
    * A few other DT fixes
  - Marvell:
    * PCI-e fixes for clocks and resource allocation
 
  + a few other smaller fixes, add a MAINTAINERS entry for reset drivers, etc.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJThNe/AAoJEIwa5zzehBx3fzAP/1Zd06ozJ3nkTyJwwFRJNudq
 ZkVA6KM8W12BpgNeyAekn0l6IHEZheNlUStarnnqh7xUq32cnF0mmiz20m+IzRes
 TBBUt7gF608Cddg/+yEwocJUS2fu5ME63kWIA8mcEsNeMMoytT6JHtMuq3HJseyk
 rTHyRrqvlRrxhK5nJaq5kQtWMy1NLufEW6BQbYBX3jzJ7mN6fMbQxKGEfwjlLjEI
 qb7v8wm+o20VZguX8/Jc//in29nLh1HXVvGAtQULdcOItwRSD8bnKi4Zzv4I0pwM
 S3wD5O/6qdibD+ov72qJEcQYYG/vOlGCbMEFEDFvKWsxm8UZ4hVIEk07dzgZGUEW
 TK6OdDgM/f12M1Hlxa8M/yu1zmQH2c4JADBs1/pJ+OEkDF8ap3jD0l6FTT2dKqfq
 Q8Jdf/KfD1pRRZoX9+QNBuAdXrekaYOhsrRL7hEv0bR3Q+eYN1x24mYIupeyfkwP
 S70I94kC4dBDz7CWy1LeBvCt2Wl6AuAwIfCvQ0kr0Kaj5WXHK6NZB1nl9zG+OKXX
 xyerBsRQmLUORNOK6bszAL28PvFveWQzwOJULaMRho8fLlbjI1gu/5YVjFpuF1Tt
 qPtiL4IfMJMgtebrMvpj9Ydb5TiS1pI0MxwyL6eSUz0Fo8MurXkDPLoQGwhEFvCh
 OkcKykZ63weo+iLOJw8o
 =73IV
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Olof Johansson:
 "A slightly larger set of fixes than we'd like at this point in the
  release.  Hopefully our very last batch before 3.15:

  OMAP:
   - Fix boot regression with CPU_IDLE enabled
   - Fixes for audio playback on OMAP5
   - Clock rate setting fix for OMAP3
   - Misc idle/PM fixes
  Exynos:
   - Removal of a couple of power domains to work around issues with
     access when they are powered down
   - Enabling missing highspeed-i2c driver to make MMC regulators work
   - Secondary CPU spin-up fix for 4212
   - Remove MDMA1 engine to avoid conflicts on secure mode platforms
   - A few other DT fixes
  Marvell:
   - PCI-e fixes for clocks and resource allocation

  plus a few other smaller fixes, add a MAINTAINERS entry for reset
  drivers, etc"

* tag 'fixes-for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
  MAINTAINERS: Add reset controller framework entry
  ARM: trusted_foundations: fix compile error on non-SMP
  ARM: at91: sam9260: fix compilation issues
  ARM: mvebu: fix definitions of PCIe interfaces on Armada 38x
  ARM: imx: fix error handling in ipu device registration
  ARM: OMAP4: Fix the boot regression with CPU_IDLE enabled
  ARM: dts: Keep LDO4 always ON for exynos5250-arndale board
  ARM: dts: Fix SPI interrupt numbers for exynos5420
  ARM: dts: fix incorrect ak8975 compatible for exynos4412-trats2 board
  ARM: OMAP2+: Fix DMA hang after off-idle
  ARM: OMAP2+: nand: Fix NAND on OMAP2 and OMAP3 boards
  ARM: dts: Remove g2d_pd node for exynos5420
  ARM: dts: Remove mau_pd node for exynos5420
  ARM: exynos_defconfig: enable HS-I2C to fix for mmc partition mount
  ARM: dts: disable MDMA1 node for exynos5420
  ARM: EXYNOS: fix the secondary CPU boot of exynos4212
  ARM: omap5: hwmod_data: Correct IDLEMODE for McPDM
  ARM: mvebu: mvebu-soc-id: keep clock enabled if PCIe unit is enabled
  ARM: mvebu: mvebu-soc-id: add missing clk_put() call
  ARM: at91/dt: sam9260: correct external trigger value
  ...
2014-05-27 13:59:24 -07:00
Yijing Wang 2f22e68ab4 sparc/PCI: Use pci_is_bridge() to simplify code
Use pci_is_bridge() to simplify code.  No functional change.

Requires: 326c1cdae7 PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438c94 PCI: Add new pci_is_bridge() interface
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: David S. Miller <davem@davemloft.net>
2014-05-27 14:57:47 -06:00
Yijing Wang c888770eb2 powerpc/PCI: Use pci_is_bridge() to simplify code
Use pci_is_bridge() to simplify code.  No functional change.

Requires: 326c1cdae7 PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438c94 PCI: Add new pci_is_bridge() interface
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-05-27 14:57:36 -06:00
Yijing Wang 11a3bd095c ia64/PCI: Use pci_is_bridge() to simplify code
Use pci_is_bridge() to simplify code.  No functional change.

Requires: 326c1cdae7 PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438c94 PCI: Add new pci_is_bridge() interface
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-05-27 14:57:16 -06:00
Yijing Wang 56a41f9949 x86/PCI: Use pci_is_bridge() to simplify code
Use pci_is_bridge() to simplify code.  No functional change.

Requires: 326c1cdae7 PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438c94 PCI: Add new pci_is_bridge() interface
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-05-27 14:56:34 -06:00
Christoph Fritz aa643aa895 ARM: dts: omap3 a83x: fix duplicate usb pin config
Node usbhshost is supporting pinctrl, so the deprecated
quirk call can be removed.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-05-27 13:51:01 -07:00
Christoph Fritz 598fbdd0c4 ARM: dts: omap3: set mcbsp2 status
This patch fixes audio support for omap3-lilly-a83x.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-05-27 13:51:00 -07:00
Sebastian Reichel 76ad4ac1ef ARM: dts: omap3-n900: Add modem support
Add modem device tree data to Nokia N900's DTS file.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-05-27 11:59:44 -07:00
Sebastian Reichel 782e25a42b ARM: dts: omap3-n900: Add SSI support
Add SSI device tree data for OMAP3 and Nokia N900.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-05-27 11:59:44 -07:00
Tony Lindgren dc94fabfc0 ARM: OMAP2+: Fix ssi hwmod entry to allow idling
The current entry prevents system from idling if
the hwmod is defined in the .dts file so let's
change the idlemodes.

Note that we probably don't have SYSC_HAS_EMUFREE
or SYSS_HAS_RESET_STATUS either. If we do, those
can be added later on.

Acked-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-05-27 11:50:17 -07:00
Stephen Boyd 96919d44af ARM: msm: Silence readb/writeb warnings due to missing IOMEM()
TROUT_CPLD_BASE needs the IOMEM() treatment to avoid warnings
from the read/writeb functions.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-27 11:42:59 -07:00
Soren Brinkmann 263c08af44 ARM: multi_v7_defconfig: Enable Zynq peripheral drivers
A few drivers for Zynq peripherals made it into mainline recently.
Enable them in the defconfig. The following devices are enabled:
 - Cadence Macb Ethernet controller
 - Cadence I2C controller
 - Arasan SDHCI

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-27 11:07:52 -07:00
Suravee Suthikulpanit 9e7f7231e4 x86/PCI: Clean up and mark early_root_info_init() as deprecated
early_root_info_init() is now deprecated in favor of info in ACPI.  Add a
note to that effect.  Also, clean up the code a bit.

There is no functional change.

Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-05-27 10:47:49 -06:00
Wenyou Yang 0279394672 ARM: at91/defconfig: sama5_defconfig: updated
due to enabling
	-- CONFIG_REGULATOR
	-- CONFIG_REGULATOR_ACT8865

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
[nicolas.ferre@atmel.com: move added entries to proper location within file]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-27 09:46:06 -07:00
Lv Zheng 92985ef1db ACPICA: Clean up redudant definitions already defined elsewhere
Since mis-order issues have been solved, we can cleanup redundant
definitions that already have defaults in <acpi/platform/acenv.h>.

This patch removes redudant environments for __KERNEL__ surrounded code.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-05-27 18:13:08 +02:00
Lv Zheng 07d8391433 ACPICA: Linux headers: Add <asm/acenv.h> to remove mis-ordered inclusion of <asm/acpi.h>
There is a mis-order inclusion for <asm/acpi.h>.

As we will enforce including <linux/acpi.h> for all Linux ACPI users, we
can find the inclusion order is as follows:

<linux/acpi.h>
  <acpi/acpi.h>
   <acpi/platform/acenv.h>
    (acenv.h before including aclinux.h)
    <acpi/platform/aclinux.h>
...........................................................................
     (aclinux.h before including asm/acpi.h)
     <asm/acpi.h>                             @Redundant@
      (ACPICA specific stuff)
...........................................................................
...........................................................................
      (Linux ACPI specific stuff) ? - - - - - - - - - - - - +
     (aclinux.h after including asm/acpi.h)   @Invisible@   |
    (acenv.h after including aclinux.h)       @Invisible@   |
   other ACPICA headers                       @Invisible@   |
............................................................|..............
  <acpi/acpi_bus.h>                                         |
  <acpi/acpi_drivers.h>                                     |
  <asm/acpi.h> (Excluded)                                   |
   (Linux ACPI specific stuff) ! <- - - - - - - - - - - - - +

NOTE that, in ACPICA, <acpi/platform/acenv.h> is more like Kconfig
generated <generated/autoconf.h> for Linux, it is meant to be included
before including any ACPICA code.

In the above figure, there is a question mark for "Linux ACPI specific
stuff" in <asm/acpi.h> which should be included after including all other
ACPICA header files.  Thus they really need to be moved to the position
marked with exclaimation mark or the definitions in the blocks marked with
"@Invisible@" will be invisible to such architecture specific "Linux ACPI
specific stuff" header blocks.  This leaves 2 issues:
1. All environmental definitions in these blocks should have a copy in the
   area marked with "@Redundant@" if they are required by the "Linux ACPI
   specific stuff".
2. We cannot use any ACPICA defined types in <asm/acpi.h>.

This patch splits architecture specific ACPICA stuff from <asm/acpi.h> to
fix this issue.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-05-27 18:13:07 +02:00
Takashi Iwai a58bdba749 Merge branch 'topic/firewire' into for-next
This is a merge of big firewire audio stack updates by Takashi Sakamoto.
2014-05-27 17:38:08 +02:00
Christoffer Dall d6d7a95c1b arm: Fix compile warning for psci
Commit e71246a23a changes psci_init from a
function returning a void to an int, but does not change the non
CONFIG_ARM_PSCI implementation to return a value, which causes a compile
warning.  Just return 0.

Cc: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-27 15:58:49 +02:00
Paolo Bonzini 04092204bb Changed for the 3.16 merge window.
This includes KVM support for PSCI v0.2 and also includes generic Linux
 support for PSCI v0.2 (on hosts that advertise that feature via their
 DT), since the latter depends on headers introduced by the former.
 
 Finally there's a small patch from Marc that enables Cortex-A53 support.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJTgjKZAAoJEEtpOizt6ddyi2gIAIO93NUZqQfJ/HmGo0cqvTsA
 OixRhSdAIgigzIavuGfp8UvTtk8WH82Qo6G7sy8/UveT1uoc3hZkfxkASLfjELw4
 rKhfMGwfXifC5zrgQ9+h1CM77lLpWMU1+PAqUOO2TZXjlOHZxSpx5AdfY03aGxvb
 sL+ovj02eGXB0IxR7dNI4XPIRS7ny+2OOzoKKH4u6ogQlwm96pptQ634sWUSM+mB
 dedJBLZHEattn5GLh+QnvDvdrROgE5wR/Ji4PX2YdXoaeEjiz0dcmLxJknj7zhj8
 jwq4NulpV2FQx5gc/KgpifCtmRo87mWgKNm6A2xJjRigcn00ekeAlADcwA4sppo=
 =J4JR
 -----END PGP SIGNATURE-----

Merge tag 'kvm-arm-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-next

Changed for the 3.16 merge window.

This includes KVM support for PSCI v0.2 and also includes generic Linux
support for PSCI v0.2 (on hosts that advertise that feature via their
DT), since the latter depends on headers introduced by the former.

Finally there's a small patch from Marc that enables Cortex-A53 support.
2014-05-27 15:58:14 +02:00
Mukesh Rathor 77945ca73e x86/xen: map foreign pfns for autotranslated guests
When running as a dom0 in PVH mode, foreign pfns that are accessed
must be added to our p2m which is managed by xen. This is done via
XENMEM_add_to_physmap_range hypercall. This is needed for toolstack
building guests and mapping guest memory, xentrace mapping xen pages,
etc.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2014-05-27 11:47:04 +01:00
Heiko Carstens 0c91f98e28 s390: require mvcos facility for z10 and newer machines
With inlined uaccess functions we always need the mvcos facility.
Checking at each inline place if mvcos is available would make the
inlining of get_user/put_user pointless.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-05-27 10:26:05 +02:00
Martin Schwidefsky cedbecd60a s390/boot: fix boot of compressed kernel built with gcc 4.9
Add -fno-delete-null-pointer-checks to CFLAGS for the code in
arch/s390/boot. Without the option a compressed kernel built with
gcc 4.9 won't boot.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-05-27 10:26:04 +02:00
Martin Schwidefsky b6f4296279 s390/time: cast tv_nsec to u64 prior to shift in update_vsyscall
Analog to git commit 28b92e09e2
first cast tk->wall_to_monotonic.tv_nsec to u64 before doing
the shift with tk->shift to avoid loosing relevant bits on a
32-bit kernel.

Cc: stable@vger.kernel.org # 3.13+
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-05-27 10:26:02 +02:00
Julia Lawall 94414ca08a s390/oprofile: make return of 0 explicit
Delete unnecessary local variable whose value is always 0 and that hides
the fact that the result is always 0.

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

// <smpl>
@r exists@
local idexpression ret;
expression e;
position p;
@@

-ret = 0;
... when != ret = e
return
- ret
+ 0
  ;
// </smpl>

[heiko.carstens: turn prepare_cpu_buffers into a void returning function]
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-05-27 10:26:00 +02:00
Nadav Amit 9b88ae99d2 KVM: x86: MOV CR/DR emulation should ignore mod
MOV CR/DR instructions ignore the mod field (in the ModR/M byte). As the SDM
states: "The 2 bits in the mod field are ignored".  Accordingly, the second
operand of these instructions is always a general purpose register.

The current emulator implementation does not do so. If the mod bits do not
equal 3, it expects the second operand to be in memory.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-27 10:22:56 +02:00
Paolo Bonzini fc57ac2c9c KVM: lapic: sync highest ISR to hardware apic on EOI
When Hyper-V enlightenments are in effect, Windows prefers to issue an
Hyper-V MSR write to issue an EOI rather than an x2apic MSR write.
The Hyper-V MSR write is not handled by the processor, and besides
being slower, this also causes bugs with APIC virtualization.  The
reason is that on EOI the processor will modify the highest in-service
interrupt (SVI) field of the VMCS, as explained in section 29.1.4 of
the SDM; every other step in EOI virtualization is already done by
apic_send_eoi or on VM entry, but this one is missing.

We need to do the same, and be careful not to muck with the isr_count
and highest_isr_cache fields that are unused when virtual interrupt
delivery is enabled.

Cc: stable@vger.kernel.org
Reviewed-by: Yang Zhang <yang.z.zhang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-27 10:21:09 +02:00
Bjorn Helgaas e5558d1a51 Merge branches 'dma-api', 'pci/virtualization', 'pci/msi', 'pci/misc' and 'pci/resource' into next
* dma-api:
  iommu/exynos: Remove unnecessary "&" from function pointers
  DMA-API: Update dma_pool_create ()and dma_pool_alloc() descriptions
  DMA-API: Fix duplicated word in DMA-API-HOWTO.txt
  DMA-API: Capitalize "CPU" consistently
  sh/PCI: Pass GAPSPCI_DMA_BASE CPU & bus address to dma_declare_coherent_memory()
  DMA-API: Change dma_declare_coherent_memory() CPU address to phys_addr_t
  DMA-API: Clarify physical/bus address distinction

* pci/virtualization:
  PCI: Mark RTL8110SC INTx masking as broken

* pci/msi:
  PCI/MSI: Remove pci_enable_msi_block()

* pci/misc:
  PCI: Remove pcibios_add_platform_entries()
  s390/pci: use pdev->dev.groups for attribute creation
  PCI: Move Open Firmware devspec attribute to PCI common code

* pci/resource:
  PCI: Add resource allocation comments
  PCI: Simplify __pci_assign_resource() coding style
  PCI: Change pbus_size_mem() return values to be more conventional
  PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources
  PCI: Support BAR sizes up to 8GB
  resources: Clarify sanity check message
  PCI: Don't add disabled subtractive decode bus resources
  PCI: Don't print anything while decoding is disabled
  PCI: Don't set BAR to zero if dma_addr_t is too small
  PCI: Don't convert BAR address to resource if dma_addr_t is too small
  PCI: Reject BAR above 4GB if dma_addr_t is too small
  PCI: Fail safely if we can't handle BARs larger than 4GB
  x86/gart: Tidy messages and add bridge device info
  x86/gart: Replace printk() with pr_info()
  x86/PCI: Move pcibios_assign_resources() annotation to definition
  x86/PCI: Mark ATI SBx00 HPET BAR as IORESOURCE_PCI_FIXED
  x86/PCI: Don't try to move IORESOURCE_PCI_FIXED resources
  x86/PCI: Fix Broadcom CNB20LE unintended sign extension
2014-05-26 17:29:17 -06:00
Olof Johansson 87427db921 Add the gpio and watchdog dts entries for the SOCFPGA platform.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTf2FPAAoJEBmUBAuBoyj0iygQALgQjMOpbw36+CNM2GAOUDHS
 oox39HNtSjfVgvu783kbLTUIiFg5MX2sRoIEqMhCZnjOAZy2urGdBYFUEtQGQrLG
 wULOm1gcaErVrusY8vBmrKp6ju7PW9tHnGMJeGF3eMgO9Ri36KvaTCzISxora+dG
 74dBZUUVkvspLS8IdFTFIvYaBqsK3bpI84G10sYL1bnpyupqW7C+/nPwNIfjnge9
 W4gVkub7J8Zxipnf72K2cQYkaMqxruN7aDPk7WBfM1y+doaXchFOtb5ZvpfevTGt
 OgCzflRIXhlWUqMFNJuMWDKs4qg3Hqx3BQDiDpF5w7aHyUBcKsIwncIo/cwffusl
 kYZ95taZ9zHubDHJ0poPDoLJ45yc5yP6Ar4avwO3U1jBNYOLbdbau4YDBcdxjkuG
 N4UaNfeRGRlOZvYbRENEdM+Wl1SYq5VSc5FadMAwOi6f6Wt5mZ9Eu+Z2u0eC5CVa
 Dz2/D6v0X5rDYr+wzywMO4qZ2kTF/vtQZFgd4bybYbTs4gBcqkz86Etlw+2IIBM6
 K6WnKeTV6Munuo+WgJThM1MI6V70QTKJoyEe/H45MV+KAZ2AigMF6qbMwbyQDSh7
 Hd0ffboNKHKoKPlQop8MUAuwbYowqgTCpqpXgSYP5Uv7QQWUd/QaNuMUSvnZmcAl
 Dp+FLrfIJ1PaC+POp3pL
 =yQKy
 -----END PGP SIGNATURE-----

Merge tag 'socfpga_dt_updates-for-3.16_take_2_version_2' of git://git.rocketboards.org/linux-socfpga-next into next/dt

Merge "SOCFPGA DTS updates for 3.16, take 2-version 2" from Dinh Nguyen:

Add the gpio and watchdog dts entries for the SOCFPGA platform.

* tag 'socfpga_dt_updates-for-3.16_take_2_version_2' of git://git.rocketboards.org/linux-socfpga-next:
  ARM: socfpga: dts: add watchdog0+1
  ARM: dts: socfpga: add gpio pieces

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 15:06:26 -07:00
Olof Johansson 7f7bb3179d some minor cleanup and add some missed nodes:
1. move dma channel descriptions to generic dma properity;
 2. add resets properity for some nodes;
 3. add missed pinctrl groups.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTayTBAAoJEDIv4aC191RhUQEQALavrvNQqB6Psk6iMXi9ZS3H
 j4O5HErQ4EeKk2i9om6wTHi8KCeEqaRPJZQ9CeaIq80AGkNH6SZWqG3G7vMrXJcF
 fhC206sPIXc6PRS57Ji9rcPyLS3yLxAz5c4DnbYCaqPbBzbqsdTgBEG0lHZ5N24r
 EKZe1003AMg7XEhp48nQeDotGv+6HWFSqI+vEa37wytFehVW0TnijZ5KBJDzkjxW
 P0+xiY89tcYI/joB9h5ABp0W3gRmx46P/T38BGXvB8x5oEQrgHi3INhWeb5oH68d
 ZRWd1UDSwjcKHgRzM+F0n0gU+MEj049vFdunYQX/lcLfBO0xC8NeLiXKR1JAD5ss
 fzNJihgMLq50pOMnT3I3jyyQohFbammue6fPeQgPSa9djcF/5ATbHO4eWV9NXYzn
 apGaZBhjAsdgJBrRvnNCDN2NWkxBroWxYS1MFpLr1j7//Rwd4+b7LmJHcKDyJXvu
 IWX3CYnCT1TdfI86orGZF9R/U+enl/D7LhXveExnCiehQPTmWYnxhcmSmz2lVxBY
 AIcDBRI3MU7EnSQKVxpCDbJZ2HETX/+nC6Qfq/+MCNbfea0uvabOLvIN7Mg+FLV3
 5U8LQqU8DBBFw4tK5zpiXz1cbT9fMrV7NgcaRmcz4v8lOztCy2DJutk7JOeMxq7k
 YFGa4oygjl+dseNr1Ncj
 =mw3T
 -----END PGP SIGNATURE-----

Merge tag 'sirf-dts-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux into next/dt

Merge "ARM: sirf: dts update for 3.16" from Barry Son:

some minor cleanup and add some missed nodes:
1. move dma channel descriptions to generic dma properity
2. add resets properity for some nodes;
3. add missed pinctrl groups.

* tag 'sirf-dts-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux:
  ARM: dts: sirf: add resets for dspif, gps and dsp nodes
  ARM: dts: atlas6: add cortex-a9-pmu compatible PMU node
  ARM: dts: sirf: move to use generic dma dt-binding for spi
  ARM: dts: sirf: add pin group for USP0 with only RX or TX frame sync for atlas6

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 15:01:07 -07:00
Olof Johansson 3a5e23cf9e This series makes edma use configuration
information available within the IP instead
 of reading it from platform data or DT. Some
 other useful clean-ups are included too.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJTgGMBAAoJEGFBu2jqvgRN/FAP/2fl2dcX8aYTVY+H7y0r4I65
 IpUGqOPktztUI0UgeDtlt1p+B4SBfOIGTP8Zx6PaDD6TQGM2GLv4HFS5yfpVF9vb
 OMbCanwHz0GED6UKBbUJQEhaebrTv/M5jdsNrwJ9qMrB7zP7zr1bTDj3G6QJD4+D
 n8yUu+HPXD9wtAh263aRPxRFeNfBhJIJtBF3b4HV52KJ0pCPmrwvqpFIahl63AsF
 Lrdbt200ZeHFVzkIANN0SSjlUDF9towTCo2ok1VaF0U7JJ1J3WMOJpT/zcrzyYsK
 A8Ts8znb/ml7JF94z4Th/dE714QyQcfX/u76skOPRsZUZ9BcQDEX0jNpP3Elgh47
 hw8yYj+BJRoCs7tE6o4WpIlCVLgRQglZeyUkTbl4hOAAmvIffoj9MSRk1LDJ/WaC
 s3PbT/93KgCOgP/iY0WsSlOPJGGQPHNEB+0O90qHL/e6fh9Kqt3dX1Sf9fj/ZFQ5
 x66qTJkDk3SkRzyWFIUyROlEH2toamHKHhQ5v1LUxSPJCekUl3PTUS3GiZtS+PmS
 85NSJWwq1Hv9xowKqVS3kkH6gLPkmTTB0uec138RQ/AMHp7SA9DCkShvheyvt1wM
 LaPuAmWBci4cALzFo1aeEUEa6ij5Waew0Nm5r9L3kJvMqBCjdLG16DnzXUShFgOq
 THYpsGPUdvdUi+JPdps0
 =AWLc
 -----END PGP SIGNATURE-----

Merge tag 'davinci-for-v3.16/edma' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/drivers

Merge "DaVinci EDMA clean-up for v3.16" from Sekhar Nori:

This series makes edma use configuration information available within
the IP instead of reading it from platform data or DT. Some other useful
clean-ups are included too.

* tag 'davinci-for-v3.16/edma' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: (34 commits)
  ARM: edma: Remove redundant/unused parameters from edma_soc_info
  ARM: davinci: Remove redundant/unused parameters for edma
  ARM: dts: am4372: Remove obsolete properties from edma node
  ARM: dts: am33xx: Remove obsolete properties from edma node
  dt/bindings: ti,edma: Remove redundant properties from documentation
  ARM: edma: Get IP configuration from HW (number of channels, tc, etc)
  ARM: edma: Save number of regions from pdata to struct edma
  ARM: edma: Remove num_cc member from struct edma
  ARM: edma: Remove queue_tc_mapping data from edma_soc_info
  ARM: davinci: Remove eDMA3 queue_tc_mapping data from edma_soc_info
  ARM: edma: Do not change TC -> Queue mapping, leave it to default.
  ARM: edma: Take the number of tc from edma_soc_info (pdata)
  ARM: edma: No need to clean the pdata in edma_of_parse_dt()
  ARM: edma: Clean up and simplify the code around irq request
  dmaengine: edma: update DMA memcpy to use new param element
  dmaengine: edma: Document variables used for residue accounting
  dmaengine: edma: Provide granular accounting
  dmaengine: edma: Make reading the position of active channels work
  dmaengine: edma: Store transfer data in edma_desc and edma_pset
  dmaengine: edma: Create private pset struct
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 14:59:05 -07:00
Olof Johansson 7741fa197c The patch fixes EDMA crossbar mapping to actually
make it work. The patch has been tagged for stable.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJTX7HWAAoJEGFBu2jqvgRNJSQP/3zwkXJizhctwlr91OYwJyZ+
 uN30iljZvVKf5i+qgp4syjznHOT/yFyS33lG3S9cSSjyjsdZcj5DbOOh2PTEzZd+
 josb6bZ+Z6YQBmcYy8V6KuWyEV8UfTr/3wGDb+/cfGfFACD8uxHZo0K/s7p6LCCb
 LIo/yzI3DpgrkWYJ7S4kIjz3P+k0gCc3zy1QwbmyWFXYIwREHlgdRAz/M+vjEHyg
 tx7HZiewg++dGeSui2PHdxhyTANj6k5emBiGTCOUUBYQ0iI4cGsaT2orzxtgEFRx
 Cgd7+/p5Uih2XyC9+7aV6flJoOS2qhsBGvlunVmnd9b7hNxtAtV73I8CEzv3GxDN
 hu6WqPnF9ZIO9hPrj6HdrLtYNPJcmRzvaCT9LOCp3q+kxqjGI6QkrDP9hTT0xc4e
 9R9/n380048CLsjarfrYgeA1PCDq84I3wbRUUf2Wtgr2vaZufgL6m4cDeZRtzk/s
 Ccz+zu4hhxK7NWIH+aze2wcc/8o+l35vaVp2GjGJnh47CAr2Wd65AplWLQhzM3EP
 XAiXh2PKAd5fenIlKBIShFI5j+EZ/dSmAqXgYFhXUI7QG35feXeAa8YdbiWSRscq
 jqOoDTmKX8eT5p/0i7Dkh9dvHOpiwoHimSHt3yVRQQXAOjj5fyQpjVXBHpHv6+YV
 8eY2u5v16Off5qNT4EWH
 =eyxH
 -----END PGP SIGNATURE-----

Merge tag 'davinci-fixes-for-v3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/drivers

The patch fixes EDMA crossbar mapping to actually
make it work. The patch has been tagged for stable.

* tag 'davinci-fixes-for-v3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: common: edma: Fix xbar mapping
2014-05-26 14:55:53 -07:00
Olof Johansson 4fd0912044 arm: Xilinx Zynq cleanup patches for v3.16
- Add support for BIG Endian
 - Add SOC_BUS support
 - Sort Kconfig options
 - Fix early console
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iEYEABECAAYFAlOCxdwACgkQykllyylKDCEydwCglWoRgU1kvPH6oqyH5esHv7L3
 oY4AnA+t3msa91ovFFbsCm2xW77QbbC6
 =Ubf9
 -----END PGP SIGNATURE-----

Merge tag 'zynq-cleanup-for-3.16' of git://git.xilinx.com/linux-xlnx into next/soc

Merge "Xilinx Zynq changes for v3.16" from Michal Simek:

arm: Xilinx Zynq cleanup patches for v3.16

- Add support for BIG Endian
- Add SOC_BUS support
- Sort Kconfig options
- Fix early console

* tag 'zynq-cleanup-for-3.16' of git://git.xilinx.com/linux-xlnx:
  ARM: zynq: Enable big-endian
  ARM: zynq: Fix uart0 early console virtual address
  clocksource: cadence_ttc: Use readl/writel_relaxed instead of __raw
  ARM: zynq: Sort Kconfig options
  ARM: zynq: Add support for SOC_BUS

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 14:52:23 -07:00
Olof Johansson 03a2ec647b This patch clean-up an unused #define
from code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJTgGN5AAoJEGFBu2jqvgRNaXcP/1XuulvuLbBnB8TtdCJsYUtO
 GRQaG+SSyE5kQeZlUPxeo4ionSkD/4C5TIFspHGsdmah3TMoZOrdLewjA0V4TTkR
 fUPI/Ph3QrsjdH9gufqsZM1QvTder3Eij+zYxJXvXsPW2AjQNMNDigjvNwj6D8+d
 Yh1oPwMk3Q9s2frerKmOqDH6UqJspP9jEl8nnW/5yIPnNyCFG+fNWJcVRoFA450r
 HqKOaeRcEtW90m+v+9/ZwHcDEGDgybAezZQGwp2lCjTT1baA2Kl4le3NoiEjVXFj
 Rw6P410oG0JRQ9KYEpbytTxq5KISgNt68+yMPQvyR8xJe3htLYBMq+oqEC0nTbBS
 ozpatE3YCKSUubdvnPHJo2YLgYMkhqG3UK243kpgTjoUvAcfAOBdhgkv5PNEAThO
 nv2Zyv2ibUaYtidCLYJw6yi2mKi6JkpLj/itRISZpv9z3WZFOyAk6RdpEoB5FHql
 lkOGtK3O+tn0V7GjQ/I+A1X3FyBwwdKpG+rtqVlDXttQ/3fpe7BXaKHJact/yP3E
 OIYSc6jyGlpNHxo7WaTPEcJ0wCsaTr36QOTMdSjmY/Gcsm/xqeY+SWOryefUsC4L
 J21LaJLkbjZtkhKzc/VAKpWo9db9UQeXRS69te5+qqM9jhv81ae5SYNbh8CL5A91
 1KmNukjjMq6SazkWBUI+
 =20Mh
 -----END PGP SIGNATURE-----

Merge tag 'davinci-for-v3.16/board' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/boards

Merge "DaVinci board changes for v3.16" from Sekhar Nori:

This patch clean-up an unused #define from code.

* tag 'davinci-for-v3.16/board' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: davinci: remove checks for CONFIG_USB_MUSB_PERIPHERAL

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 14:43:34 -07:00
Olof Johansson 70bc6bb3f2 arm: Xilinx Zynq dt patches for v3.16
- Cleanup GIC mode
 - Cleanup node names
 - Add regulators
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iEYEABECAAYFAlN7YLEACgkQykllyylKDCHD9wCfTb/wGtIAB/Gc4Kj/vp4wMPR5
 ChAAnRn07YxdT5Si5uq0WRbnSFXL3JfN
 =WXYP
 -----END PGP SIGNATURE-----

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

Merge "arm: Xilinx Zynq dt patches for v3.16" from Michal Simek:

- Cleanup GIC mode
- Cleanup node names
- Add regulators

* tag 'zynq-dt-for-3.16' of git://git.xilinx.com/linux-xlnx:
  ARM: zynq: dt: Add a fixed regulator for CPU voltage
  ARM: zynq: dt: Clean up device tree
  ARM: dts: zynq: drop address cells from GIC node

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 13:42:06 -07:00
Finn Thain 97f3f68c21 m68k: Toward platform agnostic framebuffer debug logging
Code subject to #ifdef CONSOLE is made more generic, as was apparently
intended by the original author.

Remove console_put_stats() routine. If it should be somehow useful, it
should also be useful on platforms without framebuffer debug logging. The
present implementation is only built #if defined CONFIG_MAC && defined
CONSOLE even though puts() works everywhere.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Stephen N Chivers <schivers@csc.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-26 22:41:25 +02:00
Michael Schmitz fded332bf4 m68k/atari - stram: alloc ST-RAM pool even if kernel not in ST-RAM
With the kernel loaded to FastRAM (TT-RAM), none of the ST-RAM
address range is mapped by init_mem, and ST-RAM is not accessible
through the normal allocation pathways as a result.

Implement ST-RAM pool allocation to be based on physical addresses
always (it already was when the kernel was loaded in ST-RAM).
Return kernel virtual addresses as per normal.

The current test for the kernel residing in ST-RAM always returns
true. Use the bootinfo memory chunk order instead - with the kernel
in FastRAM, ST-RAM (phys. 0x0) is not the first chunk.

In case the kernel is running from FastRAM, delay mapping of ST-RAM
pool until after mem_init.

Provide helper functions for those users of ST-RAM that need
to be aware of the backing physical addresses.

Kudos to Geert for his hints on getting this started.

Signed-off-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-26 22:41:24 +02:00
Olof Johansson e469d6ba0a Despite relatively young Berlin SoC support, we already have support
for a BG2Q SoC provided by Alexandre Belloni and Antoine Tenart. Also,
 we gained support for DW gpio and a pinctrl driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTem9rAAoJEN2kpao7fSL44MoP/2gKwUDNdYkUD4eM0fz56e5Y
 dLt/OyOtiUxIDw4jb6iKv0ldMOlkzaY713tIqtN1GVURW5Nyv0vgpyAle7NVNHuP
 hw+gFAuD0cJvmKXb4/RYGsuRD1xJ3agnALqTA3hu/5QPCU6+uOjipRNBity8KX62
 hjGcvwr5OBezfeONbubPp6Zl+5R0v/gPLaZIeDyTMWNpMSSuiPrxfer0VoEw0C9O
 6WOoSStkxi81mxAPuxRvKFZ2RaHowDNWFRm0sTRnE2svywe5w/IathAJHtnTjGV4
 Ug1aL9Ng5L09FrYSX6YeTEoyN3huucRWx3eIXDZdtS9P5ReaILWyat+w3ewkLWBr
 b1gXijfeHHVmAhlBZUkdP0zPGh4pifTJPMlX5Sd1yE61i/qOj3PcduixocIsDGrO
 htUJCqf3RFLpqoe2ReZ5cSXkHPz4/t31mdhqCK48zlyBzAZslpVYEyYiNyUM+6Q8
 HnpCAbKc/BvykcLYlrtHJm3pHbzMQGQeqoyOdBET1bY8ejXW6NF874MJPvOMqW+l
 tr6AzDWIikOGJ+rsH9asjg4RnmQQgHEQ0tSY9yvRyP7GfhEeIwijqlTvTR9gQQfa
 3C9f+ay+Uu+aXnJZgeQWxccxJE1vU0wCbtrSpa4+jDkQB8KIP9ZArLht7Ku+0i1c
 9/vYRdQhDqlbtQc2kmqw
 =HJNa
 -----END PGP SIGNATURE-----

Merge tag 'berlin-soc-3.16' of https://github.com/shesselba/linux-berlin into next/soc

Merge "ARM: berlin: SoC changes for v3.16" from Sebastian Hesselbart:

Despite relatively young Berlin SoC support, we already have support
for a BG2Q SoC provided by Alexandre Belloni and Antoine Tenart. Also,
we gained support for DW gpio and a pinctrl driver.

* tag 'berlin-soc-3.16' of https://github.com/shesselba/linux-berlin:
  ARM: berlin: add the pinctrl dependency for the Marvell Berlin SoCs
  ARM: berlin: add the LIBGPIO as a dependency for the BG2Q
  ARM: berlin: add MACH_BERLIN_BG2Q symbol
  ARM: berlin: add Marvell Armada 1500 pro to Marvell doc

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 13:41:02 -07:00
Olof Johansson 84cc8a7114 Quite a lot changes but it looks like DT approach is really paying off.
BG2Q joins Berlin SoC family with corresponding development board, DW
 gpio nodes for all SoCs. Most notably, we have settled clock bindings
 to allow us to continue on drivers requiring clocks and pinctrl bindings.
 Last but not least, BG2Q gained SDHCI support and is able to properly
 boot into userspace.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTenGqAAoJEN2kpao7fSL4TzgP/0lTj/kMs6jMvJ/Jq92PhJAX
 sdyCC5sWdJuC88RcteOaQ5VlGF9bGj9J2RNBDmnyC+HqYbc+e1fmQW+U/+rmcMBt
 T5OdmrVY9UxyfpVuXlUN2Y3MORiKNoxZyr8L9GoaER5FrUYQwgGbi+8HyEh3RMV+
 np6TJ+zYDpSTZHJmBSvn1xzwVKtDXPDi8kbteFjV4VjUOKJjrWRCSi5Tu71J3C2D
 yljmLZZR2Ei96+6YrgyL4qeQkATN3VpAzVDs2jl7SmAK7oRHW1mkBr3ToZQ8cc56
 gWUuyeOOU8vSXk+bkp0bIPDxFqfy9LBJqxfG0wVcbWN51as/MmqoorWgU6MQXVHV
 Oe292vEi1c+zgsGS4Qg2G0aeIV5ORATa79eHaw4IYM6YXKMoNAI+JFt46SvA0QY7
 xKlnjwhgRhN1K5G+veJyemi+L/1KwjPqNbfHpFibmaQV/Q5pNtON2WR93LgUO42Q
 3daOH7nSHatCo81iSzy8NoQD1rgylFq8HOFGFdfp+QL68qLb7wsn6goOtcltWYBE
 TT7C/YyjWdy13MQaJkrRZQIKPMDGFk6X3Bd6yWICbiPZW9svBkM9cFeqiyJo0CEu
 miHIVMxgoOVt1LyC08w9A66fhFuKrWI0Si6Ig573klvpzUBfy9lc2KcZ+stheCkZ
 6VW13d+DfBoyy+z78rQ/
 =C9FR
 -----END PGP SIGNATURE-----

Merge tag 'berlin-dt-3.16' of https://github.com/shesselba/linux-berlin into next/dt

Merge "ARM: berlin: DT changes for v3.16" from Sebastian Hesselbart:

Quite a lot changes but it looks like DT approach is really paying off.
BG2Q joins Berlin SoC family with corresponding development board, DW
gpio nodes for all SoCs. Most notably, we have settled clock bindings
to allow us to continue on drivers requiring clocks and pinctrl bindings.
Last but not least, BG2Q gained SDHCI support and is able to properly
boot into userspace.

* tag 'berlin-dt-3.16' of https://github.com/shesselba/linux-berlin:
  ARM: dts: berlin: enable SD card reader and eMMC for the BG2Q DMP
  ARM: dts: berlin: add the SDHCI nodes for the BG2Q
  ARM: dts: berlin: add the pinctrl node and muxing setup for uarts
  dt-binding: ARM: add pinctrl binding docs for Marvell Berlin2 SoCs
  ARM: dts: berlin: convert BG2Q to DT clock nodes
  ARM: dts: berlin: convert BG2 to DT clock nodes
  ARM: dts: berlin: convert BG2CD to DT clock nodes
  clk: berlin: add binding include for Berlin SoC clock ids
  dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs
  ARM: dts: berlin: add the BG2CD GPIO nodes
  ARM: dts: berlin: add the BG2 GPIO nodes
  ARM: dts: berlin: add the BG2Q GPIO nodes
  ARM: dts: berlin: add scu and chipctrl device nodes for BG2/BG2Q
  ARM: dts: berlin: add the Marvell BG2-Q DMP device tree
  ARM: dts: berlin: add the Marvell Armada 1500 pro

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 13:35:57 -07:00
Olof Johansson 2ca602de42 PM related fixes for omap3 that were discovered during omap3
conversion to device tree. This series sets up the PMIC signaling
 in a way where we can test for PM regressions easily by
 looking at state of the the sys_clkreq and sys_off_mode pins.
 
 Note that this series alone does not make omap3 PM to cut
 off core voltage during off-idle, changes to twl4030-power.c
 configurations are still needed. Those will be posted
 separately.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTa+Y/AAoJEBvUPslcq6VzzIoQAIRtJk2cvwd/8CzfmNG6OQl1
 cuzO0/HUsueQtzarCcNLSR00a9COD9ZcrZPIJWGsnSs/HM0bOWQTnx2GE75o//58
 PxOF527a66Eyg+VmJvJAeo/lkTWhsTrb1CgRN45KnP6sVbtO5+5MYGrkkbw2q/ML
 lfFqiMrB02a9mp2Rq2Qy4et4L1bedTEAX5NdmKzZRIoygavXTWe/zP/FKppBnYTh
 bcUGjPDbkwUHQFoJKpX4I5yq91rWdZuPD0cb+e4QYI/+C2b7yQX5HFJBT0x9hDOl
 aGEh08dzO6jTU5HFlJhXOjBka7M9iBaYixKOU8ejnoFtVzU1A/tXOFIdyafBWp4N
 iYUqTW3HTKgeFnTEW7ei55XC3Mfwuk7YHm9v+GEhU76iw9FnChMajLBaUwRnL5Tm
 8YxKK2ubcgYW10bK5ZhvRP2dPAOgn7x7uwm9Mp8Il2zyvTiOR5Fw/oyd1l5G4tlD
 FM1+v19xypfGFIyULZwFsSDL+0M57OudvK4U75vue0oyV6QyksHDHeu2k5nETTsS
 CHcjUO0rJTAcgOQrgGuQCmD0qcUu7Qs40boQ8YQlZ73sJSH2qNR5QCRjOXi0r5gx
 yoqpor2rR4R9q+XEpHA3M/YjerH0rsAtsXETPg7yifEP9TV8TDnTTRGyxxgeXHlo
 22mOK74gPcGH6EBaPeY7
 =SIKK
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.16/pm-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Merge "ARM: omap pm changes for v3.16 merge window, resend" from Tony Lindgren:

PM related fixes for omap3 that were discovered during omap3
conversion to device tree. This series sets up the PMIC signaling
in a way where we can test for PM regressions easily by
looking at state of the the sys_clkreq and sys_off_mode pins.

Note that this series alone does not make omap3 PM to cut
off core voltage during off-idle, changes to twl4030-power.c
configurations are still needed. Those will be posted
separately.

* tag 'omap-for-v3.16/pm-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Enable CPUidle in omap2plus_defconfig
  ARM: dts: Enable N900 keyboard sleep leds by default
  ARM: OMAP2+: Fix voltage scaling init for device tree
  ARM: dts: Configure omap3 twl4030 I2C4 pins by default
  ARM: OMAP3: Fix voltage control for deeper idle states
  ARM: OMAP3: Disable broken omap3_set_off_timings function
  ARM: OMAP3: Fix idle mode signaling for sys_clkreq and sys_off_mode
  ARM: dts: Fix omap serial wake-up when booted with device tree
  mfd: twl-core: Fix idle mode signaling for omaps when booted with device tree

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 13:24:56 -07:00
Olof Johansson 04b19d48e2 Non urgent omap fixes for v3.16 merge window.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTa+aAAAoJEBvUPslcq6VzGdkQANIJOZlZvG3UTDlVOF9fZXZT
 VOqDPoCSWT+vPwVo1UlKlRQEr7w+0fkkuXvD8vtiWGc+KJtDi/k5X6XX/p4eHOl0
 nabS4aBqeV7kPi6uIU3yoDQGr648embDCMJ3fRF8TT22NqOzCokbZAuqeKsI6RMH
 f3o2uGG0ltoT9JhXBbSTltlY0VO1q0HT7XqM+ChSQgS43YFkN7k5T1z2I+b2bc5o
 cFNFT6sOT0Uvy/g7E66q9Oz1eOIRxiRM3c0fevJGDL0tIfaF+IKeKzJw+4JSzq0i
 mHL0uxZ0r9qDkDZkzmg6Ff+TvH9GFLeWNJZzgo2RLLtfWU9GN7hBjPUwlBe27KFR
 UPMMHOHLlJQhaKpMfKqeU3OsmWAJXuKiXqt7nRWIB9Jo2JXk/iJ4zybeV/YBUzir
 4I8+GL103SRvVj8AQyxTCnN/50FO31kIR3ImuG/oIAwem4VjZFDzG+F/P95Jt4Vb
 8EkY9X5aZWY5tLvKe2/Eb+ENQU56sBwX+UY7jnh9AlnSYZ32JRFcnjEjA/g73zhB
 HafFva4HC1Wk5un1rsWNH6CTK+qDB+elleY7xdt8poR7Ce0n5k5NcMCgN8R2/xiz
 4NIEw/Dd8gvYqDHfGHXJeTNJ8sE3iG7w1H92yZ2glTTXhu01Nr7d6IYc0ItZ7bNH
 eRZRJSl+hI7/QQwEW7J9
 =KyHU
 -----END PGP SIGNATURE-----

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

Merge "ARM: omap non urgent fixes for v3.16 merge window, resend" from Tony
Lindgren:

Non urgent omap fixes for v3.16 merge window.

* tag 'omap-for-v3.16/fixes-not-urgent-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition
  ARM: dts: am335x-boneblack: remove use of ti,vcc-aux-disable-is-sleep
  ARM: OMAP2+: free use_gptimer_clksrc variable after boot
  ARM: OMAP5: Redo THUMB mode switch on secondary CPU
  ARM: dts: AM4372: add l3-noc information
  ARM: dts: DRA7: Use dra7-l3-noc instead of omap4-l3-noc

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 13:23:13 -07:00
Olof Johansson f51967769f Device tree related changes for omaps.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTeqB/AAoJEBvUPslcq6VzBEcQANY9sHb6yyL0l+NkC8NdcRiv
 4QASanwEXYJf9qCFujdEwBAxjVhRm32D+bzY1UGCTvcPQY3573QqKA0O3qaASbXJ
 hROZtgBll72mloKo+3gC2y1fQiKuFLb8fa7Ns9c6j7tTaDBpoN6X6ZVWY+9X+VPc
 wrOh2Q5pqYZRf8fYuI9v0+p/zpna8I6spdD6rcOTMjoe84RTYSX0Ge6gcDhhvNZ5
 oE7UWgHmqWVQ6GlRPAPqLKe/AjGraOnzh9g71Al329UF5jOFf43T5lyoVBtdbbEY
 bDRIir9lpWF9wGhY7Lgs2RcocGiWbQGvLRHlXfegem1D40OyBxpYYUzKxuuvXeae
 dLINKavWvlp73EtkZzN7EX8f/BjpZy30H4Nu397tO0vA2GsuZ7SxcH4bS8POpVLT
 s6kYLrSi3vU0idypmk8YIewfeVWVFI6gx2mMsVeOgyIW15KuuV/7q0Zk6cbPyNio
 HMVwjh7owtVFUz0D9gRG16tMODN4OvtUO56hguNUCWdbc4mJ938mAqlT3c5JZ6F6
 8q9CGXCOfiHa3x6qkgsjOYPefEqBxMUivyagukG3XeHxF5BCa7yJkrEq8tn3627b
 1bs3z1ylxUSbuLdy1RtUY/HlyFiqvjeVpDIHfrbcnWRhNFHLm8IIq/w9+dXbCiKI
 CDVvmPIxHK910JnzI3PN
 =Su13
 -----END PGP SIGNATURE-----

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

Merge "ARM: omap dt changes for v3.16 merge window, part 2" From Tony Lindgren:

Device tree related changes for omaps.

* tag 'omap-for-v3.16/dt-part2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (49 commits)
  ARM: dts: Enable mcpdm and mcbsp1 on DuoVero
  ARM: dts: Convert DuoVero Parlor to use IOPAD macro
  ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition
  ARM: dts: dra7: add support for parallel NAND flash
  ARM: dts: am437x-gp-evm: Add ethernet support for GP EVM
  ARM: dts: am4372: Add cpsw phy sel dt node
  ARM: OMAP2+: Use pdata quirks for wl12xx on VAR-STK/DVK-OM44
  ARM: dts: Add VAR-SOM-OM44 WLAN nodes
  ARM: dts: Add support for OMAP4 VAR-DVK-OM44
  ARM: dts: Add support for OMAP4 Variscite OM44 family
  ARM: dts: Change IOPAD macro's for OMAP4/5
  ARM: dts: AM33XX: fix ethernet and mdio default state
  ARM: dts: am4372: Add hdq device tree data
  ARM: omap2+: skip device build from platform code for dt
  dts: dra7-evm: add USB support
  ARM: dts: dra7: Add USB related nodes
  ARM: dts: dra7-clock: Add "l3init_960m_gfclk" clock gate
  ARM: dts: omap4+: Add clocks to USB2 PHY node
  ARM: dts: dra7: add OCP2SCP3 and SATA nodes
  ARM: dts: omap5: add sata node
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 13:21:58 -07:00
Olof Johansson 805e55d568 Merge branch 'mvebu/soc-orion5x' into next/dt
Merging in a local copy from the next/soc branch to avoid some annoying
context conflicts in the dts Makefile.

* mvebu/soc-orion5x: (29 commits)
  ARM: orion: remove no longer needed gpio DT code
  ARM: orion: remove no longer needed DT IRQ code
  ARM: orion5x: convert Maxtor Shared Storage II to the Device Tree
  ARM: orion5x: convert d2net to Device Tree
  ARM: orion5x: convert RD-88F5182 to Device Tree
  ARM: orion5x: remove unneeded code for edmini_v2
  ARM: orion5x: keep TODO list in edmini_v2 DT
  ARM: orion5x: use DT to describe NOR on edmini_v2
  ARM: orion5x: use DT to describe EHCI on edmini_v2
  ARM: orion5x: use DT to describe I2C devices on edmini_v2
  ARM: orion5x: convert edmini_v2 to DT pinctrl
  ARM: orion5x: add standard pinctrl configs for sata0 and sata1
  ARM: orion5x: add Device Bus description at SoC level
  ARM: orion5x: update I2C description at SoC level
  ARM: orion5x: enable pinctrl driver at SoC level
  ARM: orion5x: switch to DT interrupts and timer
  ARM: orion: switch to a per-platform handle_irq() function
  ARM: orion5x: convert to use 'clocks' property for UART controllers
  ARM: orion5x: switch to use the clock driver for DT platforms
  ARM: orion5x: add interrupt for Ethernet in Device Tree
  ...
2014-05-26 13:21:16 -07:00
Olof Johansson a915dfabb5 Board related changes for omaps.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTeosvAAoJEBvUPslcq6Vz5oYQAJXO5DwinMVhoWA7E8gQ3PGe
 D5SYdjk15GfocgvEBYduxuSflKitVHWHF2b78Ppcx3Aef61msbUZVtVEe5PqCpjI
 bKq7uKAJs+kzKNuI5JetDAf6RGdhuzTwAIPzQYnEmmC12Fi+ROyyGMo+76RtrHdj
 l7W7vSipXrfAROtqg8HCPMCNU0fRgSPWYTvMmhEbVH82wWEvAvRWRa/8Mp5zJWNc
 ZNNJiLgJH/1bTXyOQdBpvbDUwjMa8ZgFQSVfT2kDdfBO3eRFfbGl06ZUkHQHoZhZ
 Js0KEIuVvevaVnj53aQK8qjfD8bvgmIMkF+R9rWnkOARwTs1+XK3ZFHD4kaQGCVx
 TwIx01RAQVX74g2FEEkKFhGc4pZyggtJZzCNN0TukC2mdqvrJ95gUg0ig0DE1zgn
 A7ZURXdUcCGiuNdRW/QFczbulVmQXH8lLnKHxJsZrFX7a/mhKM7HGzKT5HPjsD9v
 YT5QpHsCFoP7c6va7RvS5SIQG/FgurBPI06KtXLOiVo+frS2uMyJPi7ZBxs5byld
 berFCpxnVhw3dbnD+dXWkJ2F40pnnT4oqgDLJRkhXwTa3FNoY4cr6PfMFFlkhS4x
 BugRrH1q/ywOYseXIxOEKClAf3aVLdBChrWg0OxMQJcewqAzbLBwxYD2fUnUWr8m
 RCmCRMtgwVHnWWMyeLrs
 =/J/G
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.16/board-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/boards

Merge "ARM: omap board changes for v3.16 merge window" from Tony Lindgren:

Board related changes for omaps.

* tag 'omap-for-v3.16/board-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAP
  ARM: OMAP: AM3517EVM: remove check for CONFIG_PANEL_SHARP_LQ043T1DG01
  ARM: OMAP: SX1: remove check for CONFIG_SX1_OLD_FLASH
  ARM: OMAP: remove some dead code
  ARM: OMAP: omap3stalker: remove two Kconfig macros
  ARM: OMAP2+: Add support for RNG on DT booted N900

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 13:00:29 -07:00
Olof Johansson ae0cda2f2a PRCM changes for omaps. I ended up merging these with the
big endian changes because of the merge conflicts for read
 and write operations. Via Paul Walmsley <paul@pwsan.com>:
 
 Some OMAP PRCM cleanup patches.  These help prepare to convert the PRCM
 code into drivers.
 
 Basic build, boot, and PM test results are available here:
 
 http://www.pwsan.com/omap/testlogs/prcm-cleanup-v3.16/20140515213244/
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTeorxAAoJEBvUPslcq6Vzwj8P/jIOYVE3Y6Gf5DJYVog9Gbwe
 HItn4+0cfLtJkX0/VCAYNFMl/n4phR+qz5PNldMVdIs2E8BUyqdAoaU6mQ+xmvhy
 BsCXzAQxlxlVhfdl+PDBaJ2Z6lU6CUZ+QSngGBWCJuEjERv6iTGtlZxcfn7kdlxY
 Qb71abg034vyhTEtcKWPas7qAyH7vLchTg2315XJrbg8R9pG19nh6G8Q6GBcX3cf
 5ASQ02L8oqpVx5QDaKldTHolvWfOmGym2+kYcY83rgh2KkZ8+UxVJW8XM8RnMDjS
 0CGVcTyQ+l2aFQ9dlTw82VYno8QdMhKiocs4XdzBbUXUiNmUWAGk4xHtDbtH3+yB
 4r1CKX9yCv4H/arvz59sTO3vIgSVFwpS1RgNfQNgF5zucjkAy8V8qZsORuFVcrom
 VkQIf5j3itOMPVzMayLjntT2w9sEY7xey1RT9PQMyNtuoMUNeAujgNXy204LQgyZ
 eYP8uDCMmPpGIz6lMqXC/pthsZcNW7SoDlS08CGAS8FdgIYYJaM3Il+XSWwOSIaf
 6DnSkeHtcwaVVJm5c+aq3TJR9qeCoufl15LdI8orr8w1yhDcDN/wTfUXITiPcfw5
 DuET/RNZG4cbE1emcOlzqUHNlDU4L4aE9Ic5PYdG3htiWDrog6vTV02EgmnnNSto
 hoRzMCexx2CcCbNHkuSZ
 =e4VG
 -----END PGP SIGNATURE-----

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

Merge "ARM: omap prcm changes for v3.16 merge window" from Tony Lindgren:

PRCM changes for omaps. I ended up merging these with the
big endian changes because of the merge conflicts for read
and write operations. Via Paul Walmsley <paul@pwsan.com>:

Some OMAP PRCM cleanup patches.  These help prepare to convert the PRCM
code into drivers.

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

http://www.pwsan.com/omap/testlogs/prcm-cleanup-v3.16/20140515213244/

* tag 'omap-for-v3.16/prcm-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4: PRCM: remove references to cm-regbits-44xx.h from PRCM core files
  ARM: OMAP3/4: PRM: add support of late_init call to prm_ll_ops
  ARM: OMAP3/OMAP4: PRM: add prm_features flags and add IO wakeup under it
  ARM: OMAP3/4: PRM: provide io chain reconfig function through irq setup
  ARM: OMAP2+: PRM: remove unnecessary cpu_is_XXX calls from prm_init / exit
  ARM: OMAP2+: PRCM: cleanup some header includes
  ARM: OMAP4: CM: use cm_base* in register address calculations
  ARM: OMAP2/3: CM: remove some external dependencies
  ARM: OMAP2+: prcm: add omap_test_timeout to prcm-common.h
  ARM: OMAP3: CM: remove a few OMAP34XX_CM_REGADDR defines
  ARM: OMAP: debug-leds: raw read and write endian fix
  ARM: OMAP: counter-32k: raw read and write endian fix
  ARM: OMAP: dmtimer: raw read and write endian fix
  ARM: OMAP2+: raw read and write endian fix

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 12:59:00 -07:00
Olof Johansson 98954f4b12 SoC related changes for omaps.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTeolqAAoJEBvUPslcq6VzF5QQAN1l6R1dCqKqKOgY6QYBnglj
 X2EK0WIOApUO9eCsEN/cS+BG51Hj/S7Aa0vr7vr38MrOecQanAZNTL36GANW4y7R
 xIOWqen/RZa5+z578wzDyk8L33Z88zPvJ56upXFr+OYk2zDPily3FPWefyTrxmyD
 ehizTOGSp5m2vYnRf0LkJypjJnTie3FnnHBqkIAmVU7nuQfu4nj1jqfwboPUmtYk
 twao6h+AEQoAj+EtaTqQFLrkxbbn5bBrC9R19qCnJM7L3mMo7wlmRRJHtelPn1fR
 3mbZZAqzDSG27xONiEzMW1SE20O2Y3sA85w1YleyQSUY1osPEMfpBrVT1zemdDWF
 8v9A/v1hBiJ09HNSIJzKx3qmlWjYqqIAAoe5XjiYAy4OqiwTMSO1l/XB8uF9hy8Q
 0W8uA4kFVl5HsAWJgIBNlmW764GJC+DV1JCobQGWcg9BwQczjsX4Xp6kbmmLivzh
 e2OFAoArHyuPdVAGoLEu2yO/evRmwrbjfw3shyz414yJRJLQRLkdlx3ofnu2W0KN
 wb1huHPS8ZRxy9qKXdjBIQUzo5FnyT95KscR9qY/KXjIV1clJuYYgfwPWCp2wN+A
 RMXB1ArSX3SoQb2+I6KT3mdXvTDDmxiDi4obDPpr00hLk0oPQUt6HsLpihsRZZGC
 ORNuDhiG1/AfHE2ktCXc
 =4/QO
 -----END PGP SIGNATURE-----

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

Pull "ARM: omap soc changes for v3.16 merge window" from Tony Lindgren:

SoC related changes for omaps.

* tag 'omap-for-v3.16/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: DRA752: add detection of SoC information
  ARM: OMAP2+: Remove suspend_set_ops from common pm late init
  ARM: OMAP2+: hwmod: OMAP5 DSS hwmod data
  ARM: omap4: hwmod_data: Clean up audio related structures (remove/merge them)

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 12:57:33 -07:00
Arnd Bergmann e58cf0193c ARM: sunxi: allow building without reset controller
The sunxi reset controller code is only used with sun6i (a31).
After the platform has been split up into per-soc options, it's
now possible to build it without the reset controller code, so
the base platform init must not call into the reset driver
if that is turned off at compile time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-05-26 21:27:22 +02:00
Arnd Bergmann b33cdd283b ARM: vexpress: refine dependencies for new code
The versatile express changes for 3.16 introduced a number of
build regressions for randconfig kernels by not tracking dependencies
between the components right.

This patch tries to rectify that:

* the mach-vexpress code cannot link without the syscfg driver,
  which in turn needs MFD_VEXPRESS_SYSREG
* various drivers call devm_regmap_init_vexpress_config(), which
  has to be exported so it can be used by loadable modules
* the configuration bus uses OF DT helper functions that are not
  available to platforms disable CONFIG_OF
* The sysreg driver exports GPIOs through gpiolib, which can
  be disabled on some platforms.
* The clocksource code cannot be built on platforms that don't
  use modern timekeeping but rely on gettimeoffset.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-05-26 21:26:52 +02:00
Heiko Stübner 26ab69cb4c ARM: rockchip: convert smp bringup to CPU_METHOD_OF_DECLARE
With the newly introduced CPU_METHOD_OF_DECLARE is not necessary anymore
to reference the relevant smp_ops in the board file, but instead it can
simply be set by the enable-method property of the cpu nodes.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-26 11:15:53 -07:00
Arnd Bergmann 8d2af85e87 ARM: iop13xx: fix msi support with sparse IRQ
patch 37ebbcff78 ("arm: iop13xx: Use sparse irqs for MSI") moved
iop13xx over to sparse IRQ support, but this broke the build for the
msi.c file, which now has to include mach/irqs.h itself.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/12285212.fBJyVfk69p@wuerfel
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-05-26 17:45:09 +02:00
Gabor Juhos 66ef3fab94 MIPS: RC32434: fix broken PCI resource initialization
The parent field of the 'rc32434_res_pci_mem1' resource points to
the resource itself which is obviously wrong. Due to the broken
initialitazion, the PCI devices on the Mikrotik RB532 boards are
not working since commit 22283178 (MIPS: avoid possible resource
conflict in register_pci_controller).

Remove the field initialization to fix the issue.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Reported-by: Waldemar Brodkorb <wbx@openadk.org>
Cc: linux-mips@linux-mips.org
Cc: Gabor Juhos <juhosg@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/6940/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-05-26 09:02:06 +02:00
Steven King 83c6bdb827 m68knommu: Implement gpio support for m54xx.
Singed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26 13:28:38 +10:00
Steven King ec9f848354 m68knommu: Make everything thats not exported, static.
Singed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26 13:28:38 +10:00
Steven King ffca5af954 m68knommu: setting the gpio data direction register to output doesn't dependent upon the value to output!
Singed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26 13:28:38 +10:00
Steven King 60fc65fdd1 m68knommu: add to_irq function so we can map gpios to external interrupts.
Singed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26 13:28:37 +10:00
Steven King 151d14f4ac m68knommu: qspi declutter.
Move the check for the QSPI config option inside the function body.  If the
option is not enabled, the compiler will optimize away the empty function
body so we can remove the other check for the config option.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26 13:28:37 +10:00
Steven King e93e91f225 m68knommu: Fix the 5249/525x qspi base address.
Use the correct base address for the QSPI module on the 5249/525x.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26 13:28:37 +10:00
Steven King 7485952378 m68knommu: Add qspi clk for Coldfire SoCs without real clks.
Since we now have fake clks on devices without real clocks, we need clks
defined for qspi for the qspi driver to work on those devices.

Signed-off-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26 13:28:37 +10:00
Daniel Palmer 5198f847f7 m68k: fix a compiler warning when building for DragonBall
In file included from arch/m68k/kernel/setup.c:4:0:
arch/m68k/kernel/setup_no.c:70:0: warning: "CPU_NAME" redefined [enabled by default]
 #define CPU_NAME "MC68VZ328"
 ^
arch/m68k/kernel/setup_no.c:61:0: note: this is the location of the previous definition
 #define CPU_NAME "MC68000"
 ^

Signed-off-by: Daniel Palmer <danieruru@gmail.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26 13:28:36 +10:00
Daniel Palmer 0b1755160c m68knommu: Fix mach_sched_init for EZ and VZ DragonBall chips
Signed-off-by: Daniel Palmer <danieruru@gmail.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26 13:28:36 +10:00
Will Deacon 03eff46ce3 ARM: 8054/1: perf: add support for the Cortex-A17 PMU
The Cortex-A17 PMU is identical to that of the A12, so wire up a new
compatible string to the existing event structures.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-25 23:49:43 +01:00
Lorenzo Pieralisi 0e0779da22 ARM: 8053/1: kernel: sleep: restore HYP mode configuration in cpu_resume
On CPUs with virtualization extensions the kernel installs HYP mode
configuration on both primary and secondary cpus upon cold boot.

On platforms where CPUs are shutdown in idle paths (ie CPU core gating),
when a CPU resumes from low-power states it currently does not execute
code that reinstalls the HYP configuration, which means that the kernel
cannot run eg KVM properly on such machines.

This patch, mirroring cold-boot behaviour, executes position independent
code that reinstalls HYP configuration and drops to SVC mode safely on
warmboot, so that deep idle states can be enabled in kernel running as
hosts on platforms with power management HW.

Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Dave Martin <dave.martin@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-25 23:49:27 +01:00
Victor Kamensky 72e6ae285a ARM: 8043/1: uprobes need icache flush after xol write
After instruction write into xol area, on ARM V7
architecture code need to flush dcache and icache to sync
them up for given set of addresses. Having just
'flush_dcache_page(page)' call is not enough - it is
possible to have stale instruction sitting in icache
for given xol area slot address.

Introduce arch_uprobe_ixol_copy weak function
that by default calls uprobes copy_to_page function and
than flush_dcache_page function and on ARM define new one
that handles xol slot copy in ARM specific way

flush_uprobe_xol_access function shares/reuses implementation
with/of flush_ptrace_access function and takes care of writing
instruction to user land address space on given variety of
different cache types on ARM CPUs. Because
flush_uprobe_xol_access does not have vma around
flush_ptrace_access was split into two parts. First that
retrieves set of condition from vma and common that receives
those conditions as flags.

Note ARM cache flush function need kernel address
through which instruction write happened, so instead
of using uprobes copy_to_page function changed
code to explicitly map page and do memcpy.

Note arch_uprobe_copy_ixol function, in similar way as
copy_to_user_page function, has preempt_disable/preempt_enable.

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: David A. Long <dave.long@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-25 23:48:45 +01:00
Dave Martin 166aaf3966 ARM: 8029/1: mcpm: Rename the power_down_finish() functions to be less confusing
The name "power_down_finish" seems to be causing some confusion,
because it suggests that this function is responsible for taking
some action to cause the specified CPU to complete its power down.

This patch renames the affected functions to "wait_for_powerdown"
and similar, since this function's intended purpose is just to wait
for the hardware to finish a powerdown initiated by a previous
cpu_power_down.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-25 23:48:12 +01:00
Will Deacon 9581960a40 ARM: 8055/1: cacheflush: use -st dsb option for ensuring completion
dsb st can be used to ensure completion of pending cache maintenance
operations, so use it for the v7 cache maintenance operations.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-25 23:47:46 +01:00
Will Deacon cd000cf650 ARM: 8046/1: proc: add support for the Cortex-A17 processor
Cortex-A17 has identical initialisation requirements to Cortex-A12, so
hook it up in proc-v7.S in the same way.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-05-25 23:47:45 +01:00