aboutsummaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2013-05-03Merge branch 'tracking-armlt-arm64' into integration-linux-vexpresstracking-integration-linux-vexpress-lsk-20130505.0Jon Medhurst
Conflicts: drivers/clk/versatile/Makefile
2013-05-03Merge branch 'tracking-armlt-tc2-cpufreq' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-tc2-psci' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-tc2-pm' into integration-linux-vexpressJon Medhurst
Conflicts: arch/arm/mach-vexpress/Kconfig arch/arm/mach-vexpress/Makefile
2013-05-03Merge branch 'tracking-armlt-dcscb' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-psci' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-spc' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-cci' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-mcpm' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-tc2-dt' into integration-linux-vexpressJon Medhurst
Conflicts: arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
2013-05-03Merge branch 'tracking-armlt-misc-fixes' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-clcd' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-hdlcd' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-ve-updates' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-rtsm' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'tracking-armlt-irqchip-reorg' into integration-linux-vexpressJon Medhurst
2013-05-03Merge branch 'big-LITTLE-MP-master-v16' of ↵Jon Medhurst
git://git.linaro.org/arm/big.LITTLE/mp into integration-linux-vexpress
2013-05-03ARM: mcpm_platsmp: no need to call gic_secondary_init anymoreNicolas Pitre
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-05-03ARM: vexpress: Select multi-cluster SMP operation if requiredJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-05-03ARM: vexpress: Get tc2_pm_psci.c to use common CP15 accessor functionsJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-05-03ARM: vexpress: Fixup tc2_pm_psci.c for mcpm APIsJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-05-03ARM: vexpress: add psci support in TC2 device treeAchin Gupta
This patch adds a psci device node to allow the ospm subsystems on the TC2 to work with a psci backend implemented in the secure firmware. The function offsets start from 1 instead of 0 as thats whats the current secure firmware implements. Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
2013-05-03ARM: vexpress: add shim layer for psci backend on TC2Achin Gupta
This patch introduces a shim layer for the TC2 platform which converts 'bL_platform_power_ops' routines to their psci counterparts. The psci counterparts are implemented by the secure firmware. The shim layer is used only when Linux is running in non-secure world and the secure firmware implements psci. It also introduces the use of a reference count to allow a power up call to go ahead of a power down call. Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
2013-05-03ARM: vexpress: allow native pm ops backends to probe for psci suppportAchin Gupta
This patch allows the vexpress 'tc2' native backend to probe the dt for presence of the psci backend. If present then the native implementation of the 'bL_platform_power_ops' is not used. Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
2013-05-03ARM: TC2: replace hard coded cluster and cpu values with constantsAchin Gupta
This patch adds constants in a tc2 specific header file to prevent use of hard coded values for specifying the number of cpus and clusters. Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
2013-05-03ARM: TC2: reset CPUs spuriously woken up on cluster power upLorenzo Pieralisi
On TC2, all CPUs in a cluster are woken up when an IRQ event triggers for a CPU in a cluster in shutdown state. This patch puts spuriously woken CPUs back in reset by checking the pending IRQ status in the SPC wake-up interrupt status register; if the CPU has no pending IRQ routed to it, the core reexecutes wfi and it is put in reset by FW straight away. Tested-by: Viresh Kumar <viresh.kumar2@arm.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2013-05-03Use dts compatible node to init cpuidle-tc2mark hambleton
Change the init code for cpuidle-tc2 to check for a compatible node in the devicetree of "arm,generic" in preparation for moving it to driver/cpuidle. Rename functions / variable from tc2_ to bl_. Signed-off-by: mark hambleton <mahamble@broadcom.com>
2013-05-03ARM: vexpress/tc2: clean up the cpuidle driverNicolas Pitre
Use the bL_cpu_suspend method instead of bL_cpu_power_down. This allows for the driver to become usable on non SPC based platform such as RTSM if vexpress_spc_check_loaded() is removed. Signed-off-by: Nicolas Pitre <nico@linaro.org>
2013-05-03ARM: mcpm: Make all mcpm functions notraceDave Martin
The functions in mcpm_entry.c are mostly intended for use during scary cache and coherency disabling sequences, or do other things which confuse trace ... like powering a CPU down and not returning. Similarly for the backend code. For simplicity, this patch just makes whole files notrace. There should be more than enough traceable points on the paths to these functions, but we can be more fine-grained later if there is a need for it. Signed-off-by: Dave Martin <dave.martin@linaro.org>
2013-05-03ARM: vexpress/tc2: implement PM suspend methodNicolas Pitre
This is simplistic for the moment as the expected residency is used to prevent the shutting down of L2 and the cluster if the residency for the last man is lower than 5 ms. To make this right, the residency end time for each CPU would need to be recorded and taken into account. On a suspend, the firmware mailbox address has to be set prior entering low power mode. Signed-off-by: Nicolas Pitre <nico@linaro.org>
2013-05-03ARM: TC2: disable GIC CPU IF on power downLorenzo Pieralisi
On TC2 testchip the GIC CPU IF must be disabled before powering down a core since a pending IRQ might cause wfi completion and the processor would exit wfi state while power controller is taking action to reset or power up the CPU upon IRQ reception. This patch adds code that disables the GIC CPU IF in TC2 specific power API methods. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2013-05-03ARM: TC2: basic PM supportNicolas Pitre
Signed-off-by: Nicolas Pitre <nico@linaro.org>
2013-05-03ARM: Enable selection of SMP operations at boot timeJon Medhurst
Add a new 'smp_init' hook to machine_desc so platforms can specify a function to be used to setup smp ops instead of having a statically defined value. The hook must return true when smp_ops are initialized. If false the static mdesc->smp_ops will be used by default. Add the definition of "bool" by including the linux/types.h file to asm/mach/arch.h and make it self-contained. Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2013-05-03ARM: mcpm: Make all mcpm functions notraceDave Martin
The functions in mcpm_entry.c are mostly intended for use during scary cache and coherency disabling sequences, or do other things which confuse trace ... like powering a CPU down and not returning. Similarly for the backend code. For simplicity, this patch just makes whole files notrace. There should be more than enough traceable points on the paths to these functions, but we can be more fine-grained later if there is a need for it. Signed-off-by: Dave Martin <dave.martin@linaro.org>
2013-05-03ARM: vexpress: allow native pm ops backends to probe for psci suppportAchin Gupta
This patch allows the vexpress 'rtsm' native backend to probe the dt for presence of the psci backend. If present then the native implementation of the 'bL_platform_power_ops' is not used. Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-05-03ARM: vexpress/dcscb: handle platform coherency exit/setup and CCIDave Martin
Add the required code to properly handle race free platform coherency exit to the DCSCB power down method. The power_up_setup callback is used to enable the CCI interface for the cluster being brought up. This must be done in assembly before the kernel environment is entered. Thanks to Achin Gupta and Nicolas Pitre for their help and contributions. Signed-off-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Pawel Moll <pawel.moll@arm.com>
2013-05-03ARM: vexpress/dcscb: do not hardcode number of CPUs per clusterNicolas Pitre
If 4 CPUs are assumed, the A15x1-A7x1 model configuration would never shut down the initial cluster as the 0xf reset bit mask will never be observed. Let's construct this mask based on the provided information in the DCSCB config register for the number of CPUs per cluster. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Pawel Moll <pawel.moll@arm.com>
2013-05-03ARM: vexpress/dcscb: add CPU use counts to the power up/down API implementationNicolas Pitre
It is possible for a CPU to be told to power up before it managed to power itself down. Solve this race with a usage count as mandated by the API definition. Signed-off-by: nicolas Pitre <nico@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Pawel Moll <pawel.moll@arm.com>
2013-05-03ARM: vexpress: introduce DCSCB supportNicolas Pitre
This adds basic CPU and cluster reset controls on RTSM for the A15x4-A7x4 model configuration using the Dual Cluster System Configuration Block (DCSCB). The cache coherency interconnect (CCI) is not handled yet. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Pawel Moll <pawel.moll@arm.com>
2013-05-03ARM: introduce a standalone CONFIG_BIG_LITTLE optionNicolas Pitre
The BIG_LITTLE config option is independent from the MCPM one. Semantically, they cover different things. MCPM can be used on non b.L systems for example. Signed-of-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-05-03ARM: mcpm: Make all mcpm functions notraceDave Martin
The functions in mcpm_entry.c are mostly intended for use during scary cache and coherency disabling sequences, or do other things which confuse trace ... like powering a CPU down and not returning. Similarly for the backend code. For simplicity, this patch just makes whole files notrace. There should be more than enough traceable points on the paths to these functions, but we can be more fine-grained later if there is a need for it. Signed-off-by: Dave Martin <dave.martin@linaro.org>
2013-05-03ARM: mcpm: provide an interface to set the SMP ops at run timeNicolas Pitre
This is cleaner than exporting the mcpm_smp_ops structure. Signed-off-by: Nicolas Pitre <nico@linaro.org> Acked-by: Jon Medhurst <tixy@linaro.org>
2013-05-03ARM: mcpm: generic SMP secondary bringup and hotplug supportNicolas Pitre
Now that the cluster power API is in place, we can use it for SMP secondary bringup and CPU hotplug in a generic fashion. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Will Deacon <will.deacon@arm.com>
2013-05-03ARM: mcpm_head.S: vlock-based first man electionDave Martin
Instead of requiring the first man to be elected in advance (which can be suboptimal in some situations), this patch uses a per- cluster mutex to co-ordinate selection of the first man. This should also make it more feasible to reuse this code path for asynchronous cluster resume (as in CPUidle scenarios). We must ensure that the vlock data doesn't share a cacheline with anything else, or dirty cache eviction could corrupt it. Signed-off-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Will Deacon <will.deacon@arm.com>
2013-05-03ARM: mcpm: Add baremetal voting mutexesDave Martin
This patch adds a simple low-level voting mutex implementation to be used to arbitrate during first man selection when no load/store exclusive instructions are usable. For want of a better name, these are called "vlocks". (I was tempted to call them ballot locks, but "block" is way too confusing an abbreviation...) There is no function to wait for the lock to be released, and no vlock_lock() function since we don't need these at the moment. These could straightforwardly be added if vlocks get used for other purposes. For architectural correctness even Strongly-Ordered memory accesses require barriers in order to guarantee that multiple CPUs have a coherent view of the ordering of memory accesses. Whether or not this matters depends on hardware implementation details of the memory system. Since the purpose of this code is to provide a clean, generic locking mechanism with no platform-specific dependencies the barriers should be present to avoid unpleasant surprises on future platforms. Note: * When taking the lock, we don't care about implicit background memory operations and other signalling which may be pending, because those are not part of the critical section anyway. A DMB is sufficient to ensure correctly observed ordering if the explicit memory accesses in vlock_trylock. * No barrier is required after checking the election result, because the result is determined by the store to VLOCK_OWNER_OFFSET and is already globally observed due to the barriers in voting_end. This means that global agreement on the winner is guaranteed, even before the winner is known locally. Signed-off-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Will Deacon <will.deacon@arm.com>
2013-05-03ARM: mcpm: introduce helpers for platform coherency exit/setupDave Martin
This provides helper methods to coordinate between CPUs coming down and CPUs going up, as well as documentation on the used algorithms, so that cluster teardown and setup operations are not done for a cluster simultaneously. For use in the power_down() implementation: * __mcpm_cpu_going_down(unsigned int cluster, unsigned int cpu) * __mcpm_outbound_enter_critical(unsigned int cluster) * __mcpm_outbound_leave_critical(unsigned int cluster) * __mcpm_cpu_down(unsigned int cluster, unsigned int cpu) The power_up_setup() helper should do platform-specific setup in preparation for turning the CPU on, such as invalidating local caches or entering coherency. It must be assembler for now, since it must run before the MMU can be switched on. It is passed the affinity level for which initialization should be performed. Because the mcpm_sync_struct content is looked-up and modified with the cache enabled or disabled depending on the code path, it is crucial to always ensure proper cache maintenance to update main memory right away. The sync_cache_*() helpers are used to that end. Also, in order to prevent a cached writer from interfering with an adjacent non-cached writer, we ensure each state variable is located to a separate cache line. Thanks to Nicolas Pitre and Achin Gupta for the help with this patch. Signed-off-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Will Deacon <will.deacon@arm.com>
2013-05-03ARM: mcpm: introduce the CPU/cluster power APINicolas Pitre
This is the basic API used to handle the powering up/down of individual CPUs in a (multi-)cluster system. The platform specific backend implementation has the responsibility to also handle the cluster level power as well when the first/last CPU in a cluster is brought up/down. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Will Deacon <will.deacon@arm.com>
2013-05-03ARM: multi-cluster PM: secondary kernel entry codeNicolas Pitre
CPUs in cluster based systems, such as big.LITTLE, have special needs when entering the kernel due to a hotplug event, or when resuming from a deep sleep mode. This is vectorized so multiple CPUs can enter the kernel in parallel without serialization. The mcpm prefix stands for "multi cluster power management", however this is usable on single cluster systems as well. Only the basic structure is introduced here. This will be extended with later patches. In order not to complexify things more than they currently have to, the planned work to make runtime adjusted MPIDR based indexing and dynamic memory allocation for cluster states is postponed to a later cycle. The MAX_NR_CLUSTERS and MAX_CPUS_PER_CLUSTER static definitions should be sufficient for those systems expected to be available in the near future. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Will Deacon <will.deacon@arm.com>
2013-05-03ARM: cacheflush: add synchronization helpers for mixed cache state accessesNicolas Pitre
Algorithms used by the MCPM layer rely on state variables which are accessed while the cache is either active or inactive, depending on the code path and the active state. This patch introduces generic cache maintenance helpers to provide the necessary cache synchronization for such state variables to always hit main memory in an ordered way. Signed-off-by: Nicolas Pitre <nico@linaro.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Dave Martin <dave.martin@linaro.org>
2013-04-29arm64: generate android deconfig using savedefconfigRyan Harkin
This patch converts the vexpress-android_defconfig file from a saved .config into a file generated by savedefconfig. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>