1. 28 5月, 2014 20 次提交
    • 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: pm-cps: add PM state entry code for CPS systems · 3179d37e
      Paul Burton 提交于
      This patch adds code to generate entry & exit code for various low power
      states available on systems based around the MIPS Coherent Processing
      System architecture (ie. those with a Coherence Manager, Global
      Interrupt Controller & for >=CM2 a Cluster Power Controller). States
      supported are:
      
        - Non-coherent wait. This state first leaves the coherent domain and
          then executes a regular MIPS wait instruction. Power savings are
          found from the elimination of coherency interventions between the
          core and any other coherent requestors in the system.
      
        - Clock gated. This state leaves the coherent domain and then gates
          the clock input to the core. This removes all dynamic power from the
          core but leaves the core at the mercy of another to restart its
          clock. Register state is preserved, but the core can not service
          interrupts whilst its clock is gated.
      
        - Power gated. This deepest state removes all power input to the core.
          All register state is lost and the core will restart execution from
          its BEV when another core powers it back up. Because register state
          is lost this state requires cooperation with the CONFIG_MIPS_CPS SMP
          implementation in order for the core to exit the state successfully.
      
      The code will detect which states are available on the current system
      during boot & generate the entry/exit code for those states. This will
      be used by cpuidle & hotplug implementations.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      3179d37e
    • 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
    • P
      MIPS: uasm: add MT ASE yield instruction · d674dd14
      Paul Burton 提交于
      This patch allows use of the MT ASE yield instruction from uasm. It will
      be used by a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      d674dd14
    • P
      MIPS: uasm: add wait instruction · 53ed1389
      Paul Burton 提交于
      This patch allows use of the wait instruction from uasm. It will be used
      by a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      53ed1389
    • P
      MIPS: uasm: add sync instruction · 729ff561
      Paul Burton 提交于
      This patch allows use of the sync instruction from uasm. It will be used
      by a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      729ff561
    • P
      MIPS: uasm: add jalr instruction · 49e9529b
      Paul Burton 提交于
      This patch allows use of the jalr instruction from uasm. It will be used
      by a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      49e9529b
    • P
      MIPS: uasm: add a label variant of beq · 8dee5901
      Paul Burton 提交于
      This patch allows for use of the beq instruction with labels from uasm,
      much as bne & others already do. It will be used by a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      8dee5901
    • P
      MIPS: inst.h: define microMIPS wait op · f263839a
      Paul Burton 提交于
      The opcode for the wait instruction within POOL32AXf was missing. This
      patch adds it for use by a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      f263839a
    • P
      MIPS: inst.h: define microMIPS sync op · 7ed82ad1
      Paul Burton 提交于
      The opcode for the sync instruction within POOL32AXf was missing. This
      patch adds it for use by a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      7ed82ad1
    • P
      MIPS: inst.h: define MT yield op · 6f5bb424
      Paul Burton 提交于
      The opcode for the MT ASE yield instruction within the spec3 group was
      missing. This patch adds it for use by a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      6f5bb424
    • P
      MIPS: inst.h: define COP0 wait op · b0a3eae2
      Paul Burton 提交于
      The func field for the wait instruction was missing from inst.h - this
      patch adds it.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      b0a3eae2
    • P
      MIPS: MT: define write_c0_tchalt macro · 27476f3b
      Paul Burton 提交于
      Define a macro to write to the current TCs TCHalt register. This will be
      used by a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      27476f3b
    • P
      MIPS: add kmap_noncoherent to wire a cached non-coherent TLB entry · e2a9e5ad
      Paul Burton 提交于
      This is identical to kmap_coherent apart from the cache coherency
      attribute used for the TLB entry, so kmap_coherent is abstracted to
      kmap_prot which is then called for both kmap_coherent &
      kmap_noncoherent. This will be used by a subsequent patch.
      Suggested-by: NLeonid Yegoshin <leonid.yegoshin@imgtec.com>
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      e2a9e5ad
  2. 02 5月, 2014 13 次提交
  3. 24 4月, 2014 1 次提交
  4. 19 4月, 2014 4 次提交
    • K
      mips: export flush_icache_range · 8229f1a0
      Kees Cook 提交于
      The lkdtm module performs tests against executable memory ranges, so it
      needs to flush the icache for proper behaviors.  Other architectures
      already export this, so do the same for MIPS.
      
      [akpm@linux-foundation.org: relocate export sites]
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Sanjay Lal <sanjayl@kymasys.com>
      Cc: John Crispin <blogic@openwrt.org>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8229f1a0
    • V
      Shiraz has moved · 9cc23682
      Viresh Kumar 提交于
      shiraz.hashim@st.com email-id doesn't exist anymore as he has left the
      company.  Replace ST's id with shiraz.linux.kernel@gmail.com.
      
      It also updates .mailmap file to fix address for 'git shortlog'.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Cc: Shiraz Hashim <shiraz.linux.kernel@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9cc23682
    • M
      powerpc/mm: fix ".__node_distance" undefined · 12c743eb
      Mike Qiu 提交于
        CHK     include/config/kernel.release
        CHK     include/generated/uapi/linux/version.h
        CHK     include/generated/utsrelease.h
        ...
        Building modules, stage 2.
      WARNING: 1 bad relocations
      c0000000013d6a30 R_PPC64_ADDR64    uprobes_fetch_type_table
        WRAP    arch/powerpc/boot/zImage.pseries
        WRAP    arch/powerpc/boot/zImage.epapr
        MODPOST 1849 modules
      ERROR: ".__node_distance" [drivers/block/nvme.ko] undefined!
      make[1]: *** [__modpost] Error 1
      make: *** [modules] Error 2
      make: *** Waiting for unfinished jobs....
      
      The reason is symbol "__node_distance" not been exported in powerpc.
      Signed-off-by: NMike Qiu <qiudayu@linux.vnet.ibm.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Cc: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
      Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
      Cc: Alistair Popple <alistair@popple.id.au>
      Cc: Mike Qiu <qiudayu@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      12c743eb
    • V
      ARC: Delete stale barrier.h · 64ee9f32
      Vineet Gupta 提交于
      Commit 93ea02bb ("arch: Clean up asm/barrier.h implementations")
      wired generic barrier.h for ARC, but failed to delete the existing file.
      
      In 3.15, due to rcupdate.h updates, this causes a build breakage on ARC:
      
            CC      arch/arc/kernel/asm-offsets.s
          In file included from include/linux/sched.h:45:0,
                           from arch/arc/kernel/asm-offsets.c:9:
          include/linux/rculist.h: In function __list_add_rcu:
          include/linux/rculist.h:54:2: error: implicit declaration of function smp_store_release [-Werror=implicit-function-declaration]
            rcu_assign_pointer(list_next_rcu(prev), new);
            ^
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      64ee9f32
  5. 18 4月, 2014 1 次提交
  6. 17 4月, 2014 1 次提交
    • M
      kprobes/x86: Fix page-fault handling logic · 6381c24c
      Masami Hiramatsu 提交于
      Current kprobes in-kernel page fault handler doesn't
      expect that its single-stepping can be interrupted by
      an NMI handler which may cause a page fault(e.g. perf
      with callback tracing).
      
      In that case, the page-fault handled by kprobes and it
      misunderstands the page-fault has been caused by the
      single-stepping code and tries to recover IP address
      to probed address.
      
      But the truth is the page-fault has been caused by the
      NMI handler, and do_page_fault failes to handle real
      page fault because the IP address is modified and
      causes Kernel BUGs like below.
      
       ----
       [ 2264.726905] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
       [ 2264.727190] IP: [<ffffffff813c46e0>] copy_user_generic_string+0x0/0x40
      
      To handle this correctly, I fixed the kprobes fault
      handler to ensure the faulted ip address is its own
      single-step buffer instead of checking current kprobe
      state.
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Sandeepa Prabhu <sandeepa.prabhu@linaro.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: fche@redhat.com
      Cc: systemtap@sourceware.org
      Link: http://lkml.kernel.org/r/20140417081644.26341.52351.stgit@ltc230.yrl.intra.hitachi.co.jpSigned-off-by: NIngo Molnar <mingo@kernel.org>
      6381c24c