1. 09 7月, 2015 1 次提交
    • M
      MIPS: kernel: smp-cps: Fix 64-bit compatibility errors due to pointer casting · fd5ed306
      Markos Chandras 提交于
      Commit 1d8f1f5a ("MIPS: smp-cps: hotplug support") added hotplug
      support in the SMP/CPS implementation but it introduced a few build problems
      on 64-bit kernels due to pointer being casted to and from 'int' C types. We
      fix this problem by using 'unsigned long' instead which should match the size
      of the pointers in 32/64-bit kernels. Finally, we fix the comment since the
      CM base address is loaded to v1($3) instead of v0.
      
      Fixes the following build problems:
      
      arch/mips/kernel/smp-cps.c: In function 'wait_for_sibling_halt':
      arch/mips/kernel/smp-cps.c:366:17: error: cast from pointer to integer of
      different size [-Werror=pointer-to-int-cast]
      [...]
      arch/mips/kernel/smp-cps.c: In function 'cps_cpu_die':
      arch/mips/kernel/smp-cps.c:427:13: error: cast to pointer
      from integer of different size [-Werror=int-to-pointer-cast]
      
      cc1: all warnings being treated as errors
      
      Fixes: 1d8f1f5a ("MIPS: smp-cps: hotplug support")
      Cc: <stable@vger.kernel.org> # 3.16+
      Reviewed-by: NPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: stable@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/10586/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      fd5ed306
  2. 16 5月, 2015 1 次提交
  3. 10 4月, 2015 1 次提交
  4. 05 3月, 2015 1 次提交
  5. 24 11月, 2014 2 次提交
  6. 31 7月, 2014 2 次提交
  7. 16 6月, 2014 1 次提交
  8. 28 5月, 2014 8 次提交
    • P
      MIPS: smp-cps: duplicate core0 CCA on secondary cores · 0155a065
      Paul Burton 提交于
      Rather than hardcoding CCA=0x5 for secondary cores, re-use the CCA from
      the boot CPU. This allows overrides of the CCA using the cca= kernel
      parameter to take effect on all CPUs for consistency.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      0155a065
    • P
      MIPS: smp-cps: set a coherent default CCA · 33b68665
      Paul Burton 提交于
      This patch sets a default CCA suited for use with multi-core SMP on all
      current MIPS CPS based systems. It may still be overriden by the cca=
      argument on the kernel command line.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      33b68665
    • P
      MIPS: smp-cps: prevent multi-core SMP with unsuitable CCA · 5c399f6e
      Paul Burton 提交于
      If the user or bootloader sets the CCA to a value which is not suited
      for multi-core SMP (ie. anything non-coherent) then limit the system to
      using only a single core and warn the user.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      5c399f6e
    • P
      MIPS: smp-cps: hotplug support · 1d8f1f5a
      Paul Burton 提交于
      This patch adds support for offlining CPUs via hotplug when using the
      CONFIG_MIPS_CPS SMP implementation. When a CPU is offlined one of 2
      things will happen:
      
        - If the CPU is part of a core which implements the MT ASE and there
          is at least one other VPE online within that core then the VPE will
          be halted by settings its TCHalt bit.
      
        - Otherwise if supported the core will be powered down via the CPC.
      
        - Otherwise the CPU will hang by executing an infinite loop.
      
      Bringing CPUs back online is then a process of either clearing the
      appropriate VPEs TCHalt bit or powering up the appropriate core via the
      CPC. Throughout the process the struct core_boot_config vpe_mask field
      must be maintained such that mips_cps_boot_vpes will start & stop the
      correct VPEs.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      1d8f1f5a
    • P
      MIPS: smp-cps: use CPC core-other locking · dd9233d0
      Paul Burton 提交于
      The core which the CPC core-other region relates to is based upon the
      core-local core-other addressing register. As its name suggests this
      register is shared between all VPEs within a core, and if there is a
      possibility that multiple VPEs within a core will attempt to access
      another core simultaneously then locking is required. This wasn't
      previously a problem with the only user being cpu0 during boot, but will
      be an issue once hotplug is implemented & may race with other users such
      as cpuidle.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      dd9233d0
    • P
      MIPS: smp-cps: flush cache after patching mips_cps_core_entry · 0f4d3d11
      Paul Burton 提交于
      The start of mips_cps_core_entry is patched in order to provide the code
      with the address of the CM register region at a point where it will be
      running non-coherent with the rest of the system. However the cache
      wasn't being flushed after that patching which could in principle lead
      to secondary cores using an invalid CM base address.
      
      The patching is moved to cps_prepare_cpus since local_flush_icache_range
      has not been initialised at the point cps_smp_setup is called.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      0f4d3d11
    • P
      MIPS: smp-cps: function to determine whether CPS SMP is in use · 68c1232f
      Paul Burton 提交于
      The core power down state for cpuidle will require that the CPS SMP
      implementation is in use. This patch provides a mips_cps_smp_in_use
      function which determines whether or not the CPS SMP implementation is
      currently in use.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      68c1232f
    • P
      MIPS: smp-cps: rework core/VPE initialisation · 245a7868
      Paul Burton 提交于
      When hotplug and/or a powered down idle state are supported cases will
      arise where a non-zero VPE must be brought online without VPE 0, and it
      where multiple VPEs must be onlined simultaneously. This patch prepares
      for that by:
      
        - Splitting struct boot_config into core & VPE boot config structures,
          allocated one per core or VPE respectively. This allows for multiple
          VPEs to be onlined simultaneously without clobbering each others
          configuration.
      
        - Indicating which VPEs should be online within a core at any given
          time using a bitmap. This allows multiple VPEs to be brought online
          simultaneously and also indicates to VPE 0 whether it should halt
          after starting any non-zero VPEs that should be online within the
          core. For example if all VPEs within a core are offlined via hotplug
          and the user onlines the second VPE within that core:
      
            1) The core will be powered up.
      
            2) VPE 0 will run from the BEV (ie. mips_cps_core_entry) to
               initialise the core.
      
            3) VPE 0 will start VPE 1 because its bit is set in the cores
               bitmap.
      
            4) VPE 0 will halt itself because its bit is clear in the cores
               bitmap.
      
        - Moving the core & VPE initialisation to assembly code which does not
          make any use of the stack. This is because if a non-zero VPE is to
          be brought online in a powered down core then when VPE 0 of that
          core runs it may not have a valid stack, and even if it did then
          it's messy to run through parts of generic kernel code on VPE 0
          before starting the correct VPE.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      245a7868
  9. 27 5月, 2014 1 次提交
  10. 27 3月, 2014 1 次提交