1. 05 6月, 2015 3 次提交
  2. 04 6月, 2015 2 次提交
  3. 03 6月, 2015 27 次提交
  4. 02 6月, 2015 8 次提交
    • M
      selftests/powerpc: Add install support to more powerpc tests · 989898b7
      Michael Ellerman 提交于
      These tests were merged in parallel to the install support, update them
      now to use it.
      
      This also adds cross compile support for the VPHN test which was missing
      it.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      989898b7
    • C
      powerpc/configs: Replace pseries_le_defconfig with a Makefile target using merge_config · ea4d1a87
      Cyril Bur 提交于
      Rather than continuing to maintain a copy of pseries_defconfig with
      CONFIG_CPU_LITTLE_ENDIAN enabled, use the generic merge_config script
      and use an le.config to enable little endian on top of pseries_defconfig
      without the need for a duplicated _defconfig file.
      
      This method will require less maintenance in the future and will ensure
      that both 'defconfigs' are always in sync.
      
      It is worth noting that the seemingly more simple approach of:
      
        pseries_le_defconfig: pseries_defconfig
        	$(Q)$(MAKE) le.config
      
      Will not work when building using O=builddir.
      
      The obvious fix to that:
      
        pseries_le_defconfig:
        	$(Q)$(MAKE) -f $(srctree)/Makefile pseries_defconfig le.config
      
      Also does not work. This is because if we have for example:
      
      config FOO
      	depends on CPU_BIG_ENDIAN
      	select BAR
      
      Then BAR will be enabled by the first call to kconfig (via
      pseries_defconfig), and then will remain enabled after we merge
      le.config, even though FOO will have been turned off.
      
      The solution is to ensure to only invoke the kconfig logic once, after
      we have merged all the config fragments. This ensures nothing is
      select'ed on that should then be disabled by the later merged configs.
      This is done through the explicit call to make olddefconfig
      Signed-off-by: NCyril Bur <cyrilbur@gmail.com>
      Reviewed-by: NSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>
      [mpe: Massage change log, fix white space and use ARCH not SRCARCH]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      ea4d1a87
    • C
      powerpc/configs: Merge pseries_defconfig and pseries_le_defconfig · a1c97df2
      Cyril Bur 提交于
      These two configs should be identical with the exception of big or little
      endian.
      
      The big endian version has XMON_DEFAULT turned on while the little endian
      has XMON_DEFAULT not set. It makes the most sense for defconfigs not to use
      xmon by default, production systems should get back up as quickly as
      possible, not sit in xmon.
      
      In the event debugging is required, the option can be enabled or xmon=on
      can be specified on commandline.
      Signed-off-by: NCyril Bur <cyrilbur@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a1c97df2
    • J
      powerpc: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc · c1231a78
      Jiang Liu 提交于
      Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
      already have a pointer to corresponding irq_desc.
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c1231a78
    • A
      powerpc: Non relocatable system call doesn't need a trampoline · d20be433
      Anton Blanchard 提交于
      We need to use a trampoline when using LOAD_HANDLER(), because the
      destination needs to be in the first 64kB. An absolute branch has
      no such limitations, so just jump there.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      d20be433
    • A
      powerpc: Relocatable system call no longer uses the LR · 05b05f28
      Anton Blanchard 提交于
      We had some code to restore the LR in the relocatable system call path
      back when we used the LR to do an indirect branch.
      
      Commit 6a404806 ("powerpc: Avoid link stack corruption in MMU
      on syscall entry path") changed this to use the CTR which is volatile
      across system calls so does not need restoring.
      
      Remove the stale comment and the restore of the LR.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      05b05f28
    • A
      powerpc/perf: Fix book3s kernel to userspace backtraces · 72e349f1
      Anton Blanchard 提交于
      When we take a PMU exception or a software event we call
      perf_read_regs(). This overloads regs->result with a boolean that
      describes if we should use the sampled instruction address register
      (SIAR) or the regs.
      
      If the exception is in kernel, we start with the kernel regs and
      backtrace through the kernel stack. At this point we switch to the
      userspace regs and backtrace the user stack with perf_callchain_user().
      
      Unfortunately these regs have not got the perf_read_regs() treatment,
      so regs->result could be anything. If it is non zero,
      perf_instruction_pointer() decides to use the SIAR, and we get issues
      like this:
      
      0.11%  qemu-system-ppc  [kernel.kallsyms]        [k] _raw_spin_lock_irqsave
             |
             ---_raw_spin_lock_irqsave
                |
                |--52.35%-- 0
                |          |
                |          |--46.39%-- __hrtimer_start_range_ns
                |          |          kvmppc_run_core
                |          |          kvmppc_vcpu_run_hv
                |          |          kvmppc_vcpu_run
                |          |          kvm_arch_vcpu_ioctl_run
                |          |          kvm_vcpu_ioctl
                |          |          do_vfs_ioctl
                |          |          sys_ioctl
                |          |          system_call
                |          |          |
                |          |          |--67.08%-- _raw_spin_lock_irqsave <--- hi mum
                |          |          |          |
                |          |          |           --100.00%-- 0x7e714
                |          |          |                     0x7e714
      
      Notice the bogus _raw_spin_irqsave when we transition from kernel
      (system_call) to userspace (0x7e714). We inserted what was in the SIAR.
      
      Add a check in regs_use_siar() to check that the regs in question
      are from a PMU exception. With this fix the backtrace makes sense:
      
           0.47%  qemu-system-ppc  [kernel.vmlinux]         [k] _raw_spin_lock_irqsave
                  |
                  ---_raw_spin_lock_irqsave
                     |
                     |--53.83%-- 0
                     |          |
                     |          |--44.73%-- hrtimer_try_to_cancel
                     |          |          kvmppc_start_thread
                     |          |          kvmppc_run_core
                     |          |          kvmppc_vcpu_run_hv
                     |          |          kvmppc_vcpu_run
                     |          |          kvm_arch_vcpu_ioctl_run
                     |          |          kvm_vcpu_ioctl
                     |          |          do_vfs_ioctl
                     |          |          sys_ioctl
                     |          |          system_call
                     |          |          __ioctl
                     |          |          0x7e714
                     |          |          0x7e714
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      72e349f1
    • M
      powerpc/mm: Fix build break with STRICT_MM_TYPECHECKS && DEBUG_PAGEALLOC · 09f3f326
      Michael Ellerman 提交于
      If both STRICT_MM_TYPECHECKS and DEBUG_PAGEALLOC are enabled, the code
      in kernel_map_linear_page() is built, and so we fail with:
      
        arch/powerpc/mm/hash_utils_64.c:1478:2:
        error: incompatible type for argument 1 of 'htab_convert_pte_flags'
      
      Fix it by using pgprot_val().
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      09f3f326