aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-01-15arm: dtbs: add virtio mmio device to rtsmv3.10/topic/tc2Ryan Harkin
Add the virtio MMIO device to the rtsm include file. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-02ARM: 7861/1: cacheflush: consolidate single-CPU ARMv7 cache disabling codeNicolas Pitre
Commit 39792c7cf3111d69dc4aa0923859d8b929e9039f upstream This code is becoming duplicated in many places. So let's consolidate it into a handy macro that is known to be right and available for reuse. Signed-off-by: Nicolas Pitre <nico@linaro.org> Acked-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-12-02ARM: vexpress/MCPM: fix cache disable sequence when CONFIG_FRAME_POINTER=yNicolas Pitre
Commit fac2e57742d9aa3dbe41860280352efda9d5566e upstream If CONFIG_FRAME_POINTER=y we get the following error: arch/arm/mach-vexpress/tc2_pm.c: In function 'tc2_pm_down': arch/arm/mach-vexpress/tc2_pm.c:200:1: error: fp cannot be used in asm here Let's fix that by explicitly preserving r11 on the stack and removing it from the clobber list. Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-12-02ARM: vexpress/dcscb: fix cache disabling sequencesNicolas Pitre
Commit e8f9bb1bd6bb93fff773345cc54c42585e0e3ece upstream Unlike real A15/A7's, the RTSM simulation doesn't appear to hit the cache when the CTRL.C bit is cleared. Let's ensure there is no memory access within the disable and flush cache sequence, including to the stack. Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-12-02ARM: vexpress/TC2: Match mainline cache disabling sequence in tc2_pm_downJon Medhurst
When the TC2 pm code was finally upstreamed [1] the cache disbling sequence had been modified to avoid some potential race conditions. So lets backport these changes. [1] Commit 11b277eabe70 ARM: vexpress/TC2: basic PM support Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-11-29ARM: vexpress: tc2: fix hotplug/idle/kexec race on cluster power downLorenzo Pieralisi
Commit 64270d82d4bf7fb8e5347c41ea7d0477aa551391 upstream On the TC2 testchip, when all CPUs in a cluster enter standbywfi and commit a power down request, the power controller will wait for standbywfil2 coming from L2 cache controller to shut the cluster down. By the time all CPUs in a cluster commit a power down request and enter wfi, the power controller cannot backtrack, or put it another way, a CPU must not be allowed to complete execution independently of the power controller, the only way for it to resume properly must be upon wake-up IRQ pending and subsequent reset triggered from the power controller. Current MCPM back-end for TC2 disables the GIC CPU IF only when power down is committed through the tc2_pm_suspend() method, that makes sense since a suspended CPU is still online and can receive interrupts whereas a hotplugged CPU, since it is offline, migrated all IRQs and shutdown the per-CPU peripherals, hence their PPIs. The flaw with this reasoning is the following. If all CPUs in a clusters are entering a power down state either through CPU idle or CPU hotplug, when the last man successfully completes the MCPM power down sequence (and executes wfi), power controller waits for L2 wfi signal to quiesce the cluster and shut it down. If, when all CPUs are sitting in wfi, an online CPU hotplugs back in one of the CPUs in the cluster being shutdown, that CPU receives an IPI that causes wfi to complete (since tc2_pm_down() method does not disable the GIC CPU IF in that case - CPU being hotplugged out, not idle) and the power controller will never see the stanbywfil2 signal coming from L2 that is required for shutdown to happen and the system deadlocks. Further to this issue, kexec hotplugs secondary CPUs out during kernel reload/restart. Because kexec may (deliberately) trash the old kernel text, it is not OK for CPUs to follow the MCPM soft reboot path, since instructions after the WFI may have been replaced by kexec. If tc2_pm_down() does not disable the GIC cpu interface, there is a race between CPU powerdown in the old kernel and the IPI from the new kernel that triggers secondary boot, particularly if the powerdown is slow (due to L2 cache cleaning for example). If the new kernel wins the race, the affected CPU(s) will not really be reset and may execute garbage after the WFI. The only solution to this problem consists in disabling the GIC CPU IF on a CPU committed to power down regardless of the power down entry method (CPU hotplug or CPU idle). This way, CPU wake-up is under power controller control, which prevents unexpected wfi exit caused by a pending IRQ. This patch moves the GIC CPU IF disable call in the TC2 MCPM implementation from the tc2_pm_suspend() method to the tc2_pm_down() method to fix the mentioned race condition(s). Reviewed-by: Dave Martin <Dave.Martin@arm.com> Tested-by: Dave Martin <Dave.Martin@arm.com> (for kexec) Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-26cpufreq_stats: improve config option isolationMark Hambleton
Add missing pre-processor protection around calls to IKS APIs Signed-off-by: Mark Hambleton <mahamble@broadcom.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-08cpufreq: arm-big-little: don't use cpu_last_req_freq for MPViresh Kumar
While getting support for In-Kernel-Switcher in big LITTLE cpufreq driver we introduced cpu_last_req_freq per-cpu variable that stores the last frequency requested for a cpu. It was important for IKS as CPUs in the same cluster can have separate struct cpufreq_policy associated with them and so cpufreq core may try to set different frequencies on both CPUs of same cluster. But for non-IKS solution or MP we don't need to cache last requested frequency. Currently there is a bug in code where if cpufreq_driver->get() is called for any cpu other than policy->cpu, we are returning 0, because we set cpu_last_req_freq only for policy->cpu and not for others. This problem could have been fixed by setting cpu_last_req_freq for all CPUs in policy->cpus, but that wouldn't be the best solution. Purpose of cpufreq_driver->get() is to get exact frequency from the hardware instead of returning cached frequency that was last requested as that is already present with the core. Hence, this patch forces only IKS to use cpu_last_req_freq and not MP. We will get the frequency from hardware when ->get() is called for MP. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06drivers/bus: arm-cci:nobody uses cci_pmu_destroyAndy Green
Nobody uses static function, get rid of the function and warning Signed-off-by: Andy Green <andy.green@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-19Merge branch 'lsk-3.10-iks-cpufreq' of ↵Mark Brown
git://git.linaro.org/people/tixy/kernel into lsk-v3.10-tc2
2013-07-19cpufreq/arm_big_little.c: Fixing non-terminated stringMathieu J. Poirier
When declaring char name[9] = "cluster"; name[7] is equal to the string termination character '\0'. But later on doing: name[7] = cluster_id + '0'; clobbers the termination character, leaving non terminated strings in the system and potentially causing undertermined behavior. By initialising name[9] to "clusterX" the 8th character is set to '\0' and affecting the 7th character with the cluster number doesn't overwite anything. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> [ np: The C standard says that the reminder of an initialized array of a known size should be initialized to zero and therefore this patch is unneeded, however this patch makes the intent more explicit to others reading the code. ] Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2013-07-19cpufreq: arm_big_little: Don't destroy/create freq table/clk for every cpu ↵Viresh Kumar
on/off When a cpu goes down, exit would be called for it. Similarly for every cpu up init would be called. This would result in same freq table and clk structure to get freed/allocated again. There is no way for freq table/clk structures to change between these calls. Also, when we disable switcher, firstly cpufreq unregister would be called and hence exit for all cpus and then register would be called, i.e. init would be called. For saving time/energy for both cases, lets not free table/clk until module exit is not done. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-19cpufreq: arm_big_little: Unregister/register cpufreq driver with switcher ↵Nicolas Pitre
notifiers Cpufreq driver must be unregistered/registered on switcher on/off to get correct freq tables for all cpus. This patch does it. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2013-07-19cpufreq: arm_big_little: add in-kernel switching(IKS) supportViresh Kumar
This patch adds IKS (In Kernel Switcher) support to cpufreq driver. This creates separate freq table for A7-A15 cpu pair. A7 frequency is virtualized and is halved, so that it touches boundaries with A7 frequencies. Based on Earlier Work from Sudeep. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-19cpufreq: cpufreq_stats: Register for bL_switcher notifiersViresh Kumar
cpufreq_stat has registered notifiers with both cpufreq and cpu core. It adds cpu/cpu0/cpufreq/stats/ directory with a notifier of cpufreq CPUFREQ_NOTIFY and removes this directory with a notifier to cpu core. On bL_switcher enable/disable, cpufreq drivers notifiers gets called and they call cpufreq_unregister(), followed by cpufreq_register(). For unregister stats directories per cpu aren't removed, because cpu never went to dead state and cpu notifier isn't called. When cpufreq_register() is called, we try to add these directories again and that simply fails, as directories were already present. Fix these issues by registering cpufreq_stats too with bL_switcher notifiers, so that they get unregistered and registered on switcher enable/disable. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-17Merge branch 'lsk-3.10-vexpress' of git://git.linaro.org/people/tixy/kernel ↵Mark Brown
into lsk-v3.10-tc2
2013-07-17Merge branch 'tracking-armlt-tc2-cpufreq' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-tc2-psci' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-tc2-pm' into lsk-3.10-vexpressJon Medhurst
Conflicts: arch/arm/mach-vexpress/Makefile
2013-07-17Merge branch 'tracking-armlt-dcscb' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-psci' into lsk-3.10-vexpressJon Medhurst
Conflicts: arch/arm/kernel/psci.c
2013-07-17Merge branch 'tracking-armlt-spc' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-cci' into lsk-3.10-vexpressJon Medhurst
Conflicts: arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
2013-07-17Merge branch 'tracking-armlt-mcpm' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-tc2-dt' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-misc-fixes' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-clcd' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-hdlcd' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-ve-updates' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-rtsm' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-config' into lsk-3.10-vexpressJon Medhurst
2013-07-01cpufreq: ARM big LITTLE: Fixup for new SPC driverJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01cpufreq: ARM big LITTLE: Add Vexpress glue driverViresh Kumar
Vexpress depends on motherboard firmware + spc for getting opp table. This patch adds Vexpress glue driver for ARM big LITTLE parent driver. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-01clk: Vexpress-spc: Fixup for new SPC driverJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01clk: Vexpress-spc: Add clock driverViresh Kumar
This patch adds spc clock controller. In Vexpress cpu cluster clock is controlled via spc controller and so it must be present in clk framework. vexpress_clk_[of_]register_spc() registers cluster clocks with and without DT. These are added as root clocks without any parents and their names are "cluster[0|1|..]". Now, platform must add clocks of all the cpus below these clusters. cpufreq driver would get cpu clock and will do clk_get[set]_rate() on cpu clock, which will then pass it to cluster clocks. And finally spc will get programmed. This patch doesn't add non-DT clocks for clusters and cpus as i don't see a user of that for now. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-01Vexpress: Enable OPP library for cpufreqViresh Kumar
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-01ARM: Select ARCH_HAS_CPUFREQ for ARCH_VEXPRESSSudeep KarkadaNagesha
This patch enables ARCH_HAS_CPUFREQ for Versatile Express platforms in order to support CPU frequency scaling. Signed-off-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
2013-07-01cpufreq: ARM big LITTLE: Add depends on BIG_LITTLEViresh Kumar
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-01ARM: vexpress: Ensure SPC driver is loaded before using it in PSCI initJon Medhurst
Otherwise we get a nullptr dereference calling vexpress_spc_get_nb_cpus. Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM: vexpress: Get tc2_pm_psci.c to use common CP15 accessor functionsJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM: vexpress: Fixup tc2_pm_psci.c for mcpm APIsJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM: 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-07-01ARM: 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-07-01ARM: 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-07-01ARM: 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-07-01tc2_pm: Fixup for new SPC driverJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM: vexpress: use generic CCI code to turn on CCI ports on TC2Nicolas Pitre
Signed-off-by: Nicolas Pitre <nico@linaro.org>
2013-07-01tc2_pm: fixup for new CCI driverJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01cpuidle: arm_big_little: Initialise earlier by using device_initcallJon Medhurst
Using late_initcall is too late for IKS. Requested-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM: 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>