]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 May 2013 16:13:19 +0000 (09:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 May 2013 16:13:19 +0000 (09:13 -0700)
Pull ARM updates from Russell King:
 "The major items included in here are:

   - MCPM, multi-cluster power management, part of the infrastructure
     required for ARMs big.LITTLE support.

   - A rework of the ARM KVM code to allow re-use by ARM64.

   - Error handling cleanups of the IS_ERR_OR_NULL() madness and fixes
     of that stuff for arch/arm

   - Preparatory patches for Cortex-M3 support from Uwe Kleine-König.

  There is also a set of three patches in here from Hugh/Catalin to
  address freeing of inappropriate page tables on LPAE.  You already
  have these from akpm, but they were already part of my tree at the
  time he sent them, so unfortunately they'll end up with duplicate
  commits"

* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (77 commits)
  ARM: EXYNOS: remove unnecessary use of IS_ERR_VALUE()
  ARM: IMX: remove unnecessary use of IS_ERR_VALUE()
  ARM: OMAP: use consistent error checking
  ARM: cleanup: OMAP hwmod error checking
  ARM: 7709/1: mcpm: Add explicit AFLAGS to support v6/v7 multiplatform kernels
  ARM: 7700/2: Make cpu_init() notrace
  ARM: 7702/1: Set the page table freeing ceiling to TASK_SIZE
  ARM: 7701/1: mm: Allow arch code to control the user page table ceiling
  ARM: 7703/1: Disable preemption in broadcast_tlb*_a15_erratum()
  ARM: mcpm: provide an interface to set the SMP ops at run time
  ARM: mcpm: generic SMP secondary bringup and hotplug support
  ARM: mcpm_head.S: vlock-based first man election
  ARM: mcpm: Add baremetal voting mutexes
  ARM: mcpm: introduce helpers for platform coherency exit/setup
  ARM: mcpm: introduce the CPU/cluster power API
  ARM: multi-cluster PM: secondary kernel entry code
  ARM: cacheflush: add synchronization helpers for mixed cache state accesses
  ARM: cpu hotplug: remove majority of cache flushing from platforms
  ARM: smp: flush L1 cache in cpu_die()
  ARM: tegra: remove tegra specific cpu_disable()
  ...

20 files changed:
1  2 
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/kernel/process.c
arch/arm/kernel/smp.c
arch/arm/kvm/handle_exit.c
arch/arm/mach-exynos/mach-nuri.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/omap-smp.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/powerdomain.c
arch/arm/mach-omap2/timer.c
arch/arm/mach-shmobile/smp-sh73a0.c
arch/arm/mach-spear/hotplug.c
arch/arm/mach-tegra/board-harmony-pcie.c
arch/arm/mach-tegra/hotplug.c
arch/arm/mach-tegra/platsmp.c
arch/arm/mach-ux500/cpu.c
arch/arm/mach-ux500/hotplug.c

Simple merge
Simple merge
Simple merge
Simple merge
index 0000000000000000000000000000000000000000,26ad17310a1efc732b6b612a7139cf56a8dedeb2..3d74a0be47dbfd81bf3950ba4bad75ed1b1b0f76
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,164 +1,164 @@@
 -              kvm_err("Unkown exception class: hsr: %#08x\n",
+ /*
+  * Copyright (C) 2012 - Virtual Open Systems and Columbia University
+  * Author: Christoffer Dall <c.dall@virtualopensystems.com>
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License, version 2, as
+  * published by the Free Software Foundation.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public License
+  * along with this program; if not, write to the Free Software
+  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+  */
+ #include <linux/kvm.h>
+ #include <linux/kvm_host.h>
+ #include <asm/kvm_emulate.h>
+ #include <asm/kvm_coproc.h>
+ #include <asm/kvm_mmu.h>
+ #include <asm/kvm_psci.h>
+ #include <trace/events/kvm.h>
+ #include "trace.h"
+ #include "trace.h"
+ typedef int (*exit_handle_fn)(struct kvm_vcpu *, struct kvm_run *);
+ static int handle_svc_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run)
+ {
+       /* SVC called from Hyp mode should never get here */
+       kvm_debug("SVC called from Hyp mode shouldn't go here\n");
+       BUG();
+       return -EINVAL; /* Squash warning */
+ }
+ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
+ {
+       trace_kvm_hvc(*vcpu_pc(vcpu), *vcpu_reg(vcpu, 0),
+                     kvm_vcpu_hvc_get_imm(vcpu));
+       if (kvm_psci_call(vcpu))
+               return 1;
+       kvm_inject_undefined(vcpu);
+       return 1;
+ }
+ static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run)
+ {
+       if (kvm_psci_call(vcpu))
+               return 1;
+       kvm_inject_undefined(vcpu);
+       return 1;
+ }
+ static int handle_pabt_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run)
+ {
+       /* The hypervisor should never cause aborts */
+       kvm_err("Prefetch Abort taken from Hyp mode at %#08lx (HSR: %#08x)\n",
+               kvm_vcpu_get_hfar(vcpu), kvm_vcpu_get_hsr(vcpu));
+       return -EFAULT;
+ }
+ static int handle_dabt_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run)
+ {
+       /* This is either an error in the ws. code or an external abort */
+       kvm_err("Data Abort taken from Hyp mode at %#08lx (HSR: %#08x)\n",
+               kvm_vcpu_get_hfar(vcpu), kvm_vcpu_get_hsr(vcpu));
+       return -EFAULT;
+ }
+ /**
+  * kvm_handle_wfi - handle a wait-for-interrupts instruction executed by a guest
+  * @vcpu:     the vcpu pointer
+  * @run:      the kvm_run structure pointer
+  *
+  * Simply sets the wait_for_interrupts flag on the vcpu structure, which will
+  * halt execution of world-switches and schedule other host processes until
+  * there is an incoming IRQ or FIQ to the VM.
+  */
+ static int kvm_handle_wfi(struct kvm_vcpu *vcpu, struct kvm_run *run)
+ {
+       trace_kvm_wfi(*vcpu_pc(vcpu));
+       kvm_vcpu_block(vcpu);
+       return 1;
+ }
+ static exit_handle_fn arm_exit_handlers[] = {
+       [HSR_EC_WFI]            = kvm_handle_wfi,
+       [HSR_EC_CP15_32]        = kvm_handle_cp15_32,
+       [HSR_EC_CP15_64]        = kvm_handle_cp15_64,
+       [HSR_EC_CP14_MR]        = kvm_handle_cp14_access,
+       [HSR_EC_CP14_LS]        = kvm_handle_cp14_load_store,
+       [HSR_EC_CP14_64]        = kvm_handle_cp14_access,
+       [HSR_EC_CP_0_13]        = kvm_handle_cp_0_13_access,
+       [HSR_EC_CP10_ID]        = kvm_handle_cp10_id,
+       [HSR_EC_SVC_HYP]        = handle_svc_hyp,
+       [HSR_EC_HVC]            = handle_hvc,
+       [HSR_EC_SMC]            = handle_smc,
+       [HSR_EC_IABT]           = kvm_handle_guest_abort,
+       [HSR_EC_IABT_HYP]       = handle_pabt_hyp,
+       [HSR_EC_DABT]           = kvm_handle_guest_abort,
+       [HSR_EC_DABT_HYP]       = handle_dabt_hyp,
+ };
+ static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu)
+ {
+       u8 hsr_ec = kvm_vcpu_trap_get_class(vcpu);
+       if (hsr_ec >= ARRAY_SIZE(arm_exit_handlers) ||
+           !arm_exit_handlers[hsr_ec]) {
++              kvm_err("Unknown exception class: hsr: %#08x\n",
+                       (unsigned int)kvm_vcpu_get_hsr(vcpu));
+               BUG();
+       }
+       return arm_exit_handlers[hsr_ec];
+ }
+ /*
+  * Return > 0 to return to guest, < 0 on error, 0 (and set exit_reason) on
+  * proper exit to userspace.
+  */
+ int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
+                      int exception_index)
+ {
+       exit_handle_fn exit_handler;
+       switch (exception_index) {
+       case ARM_EXCEPTION_IRQ:
+               return 1;
+       case ARM_EXCEPTION_UNDEFINED:
+               kvm_err("Undefined exception in Hyp mode at: %#08lx\n",
+                       kvm_vcpu_get_hyp_pc(vcpu));
+               BUG();
+               panic("KVM: Hypervisor undefined exception!\n");
+       case ARM_EXCEPTION_DATA_ABORT:
+       case ARM_EXCEPTION_PREF_ABORT:
+       case ARM_EXCEPTION_HVC:
+               /*
+                * See ARM ARM B1.14.1: "Hyp traps on instructions
+                * that fail their condition code check"
+                */
+               if (!kvm_condition_valid(vcpu)) {
+                       kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu));
+                       return 1;
+               }
+               exit_handler = kvm_get_exit_handler(vcpu);
+               return exit_handler(vcpu, run);
+       default:
+               kvm_pr_unimpl("Unsupported exception type: %d",
+                             exception_index);
+               run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
+               return 0;
+       }
+ }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index bf79626ee5a487624c567d5ec0c88f199f400aaa,2f1ef1bc805d981785f59bc0dbc0f15a8bb24a74..496592b6c763979484b58e43212cb55c4dbfdbcc
@@@ -104,16 -119,8 +104,8 @@@ static int sh73a0_cpu_kill(unsigned in
  
  static void sh73a0_cpu_die(unsigned int cpu)
  {
-       /*
-        * The ARM MPcore does not issue a cache coherency request for the L1
-        * cache when powering off single CPUs. We must take care of this and
-        * further caches.
-        */
-       dsb();
-       flush_cache_all();
        /* Set power off mode. This takes the CPU out of the MP cluster */
 -      scu_power_mode(scu_base_addr(), SCU_PM_POWEROFF);
 +      scu_power_mode(shmobile_scu_base, SCU_PM_POWEROFF);
  
        /* Enter shutdown mode */
        cpu_do_idle();
Simple merge
index 8da9f78475da21f81ef314bbd7e9e04939398378,e8323bc95770d0e951195929aced176a1889f449..184914a68d7319bc2a54292849e637c1e15310d1
  #include <linux/smp.h>
  #include <linux/clk/tegra.h>
  
- #include <asm/cacheflush.h>
  #include <asm/smp_plat.h>
  
 +#include "fuse.h"
  #include "sleep.h"
  
  static void (*tegra_hotplug_shutdown)(void);
@@@ -47,22 -46,18 +46,13 @@@ void __ref tegra_cpu_die(unsigned int c
        BUG();
  }
  
- int tegra_cpu_disable(unsigned int cpu)
- {
-       /*
-        * we don't allow CPU 0 to be shutdown (it is still too special
-        * e.g. clock tick interrupts)
-        */
-       return cpu == 0 ? -EPERM : 0;
- }
 -#ifdef CONFIG_ARCH_TEGRA_2x_SOC
 -extern void tegra20_hotplug_shutdown(void);
 -void __init tegra20_hotplug_init(void)
 +void __init tegra_hotplug_init(void)
  {
 -      tegra_hotplug_shutdown = tegra20_hotplug_shutdown;
 -}
 -#endif
 +      if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
 +              return;
  
 -#ifdef CONFIG_ARCH_TEGRA_3x_SOC
 -extern void tegra30_hotplug_shutdown(void);
 -void __init tegra30_hotplug_init(void)
 -{
 -      tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
 +      if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && tegra_chip_id == TEGRA20)
 +              tegra_hotplug_shutdown = tegra20_hotplug_shutdown;
 +      if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_chip_id == TEGRA30)
 +              tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
  }
 -#endif
Simple merge
Simple merge
index 87abcf278432abe5d25a6b19b28f0c6f37e54c80,1c55a55dd89e54d50751bc70e259150e1811856f..2bc00b085e38d4b1540a25563058735cd67a1af4
  #include <linux/errno.h>
  #include <linux/smp.h>
  
- #include <asm/cacheflush.h>
  #include <asm/smp_plat.h>
  
 -#include <mach/setup.h>
 +#include "setup.h"
  
  /*
   * platform-specific code to shutdown a CPU