1. 14 12月, 2015 4 次提交
  2. 27 11月, 2015 1 次提交
  3. 10 11月, 2015 1 次提交
  4. 03 11月, 2015 1 次提交
    • G
      ARM/PCI: Replace pci_sys_data->align_resource with global function pointer · b3a72384
      Gabriele Paoloni 提交于
      dw_pcie_host_init() creates the PCI host bridge with pci_common_init_dev(),
      an ARM-specific function that supplies the ARM-specific pci_sys_data
      structure as the PCI "sysdata".  To use dw_pcie_host_init() on other
      architectures, we will copy the internals of pci_common_init_dev() into
      pcie-designware.c instead of calling it, and dw_pcie_host_init() will
      supply the DesignWare pcie_port structure as "sysdata".
      
      Most ARM "sysdata" users are specific to non-DesignWare host bridges;
      they'll be unaffected because those bridges will continue to have the ARM
      pci_sys_data.  Most of the rest are ARM-generic functions called by
      pci_common_init_dev(); these will be unaffected because dw_pcie_host_init()
      will no longer call pci_common_init().
      
      But the ARM pcibios_align_resource() can be called by the PCI core for any
      bridge, so it can't depend on sysdata since it may be either pci_sys_data
      or pcie_port.
      
      Remove the pcibios_align_resource() dependency on sysdata by replacing the
      pci_sys_data->align_resource pointer with a global function pointer.
      
      This is less general (we can no longer have per-host bridge
      align_resource() methods), but the pci_sys_data->align_resource pointer was
      used only by Marvell (see mvebu_pcie_enable()), so this would only be a
      problem if we had a system with a combination of Marvell and other host
      bridges
      
      [bhelgaas: changelog]
      Signed-off-by: NGabriele Paoloni <gabriele.paoloni@huawei.com>
      Signed-off-by: NZhou Wang <wangzhou1@hisilicon.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
      b3a72384
  5. 27 10月, 2015 1 次提交
  6. 24 10月, 2015 1 次提交
  7. 23 10月, 2015 10 次提交
  8. 20 10月, 2015 1 次提交
  9. 10 10月, 2015 1 次提交
  10. 09 10月, 2015 1 次提交
  11. 03 10月, 2015 1 次提交
    • R
      ARM: remove user cmpxchg syscall · db695c05
      Russell King 提交于
      Mark Brand reports that a NEEDS_SYSCALL_FOR_CMPXCHG enabled kernel would
      open a security hole in the ghost syscall used to implement cmpxchg, as
      it fails to validate the user pointer.
      
      However, in order for this option to be enabled, you'd need to be
      building a pre-ARMv6 kernel with SMP support.  There is only one system
      known which fits that, which is an early ARM SMP FPGA implementation
      based on the ARM926T.
      
      In any case, the Kconfig does not allow SMP to be enabled for pre-ARMv6
      systems.
      
      Moreover, even if NEEDS_SYSCALL_FOR_CMPXCHG were to be enabled, the
      kernel would not build as __ARM_NR_cmpxchg64 is not defined.
      
      The simple answer is to remove the buggy code.
      Reported-by: NMark Brand <markbrand@google.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      db695c05
  12. 25 9月, 2015 1 次提交
  13. 23 9月, 2015 1 次提交
    • P
      atomic, arch: Audit atomic_{read,set}() · 62e8a325
      Peter Zijlstra 提交于
      This patch makes sure that atomic_{read,set}() are at least
      {READ,WRITE}_ONCE().
      
      We already had the 'requirement' that atomic_read() should use
      ACCESS_ONCE(), and most archs had this, but a few were lacking.
      All are now converted to use READ_ONCE().
      
      And, by a symmetry and general paranoia argument, upgrade atomic_set()
      to use WRITE_ONCE().
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: james.hogan@imgtec.com
      Cc: linux-kernel@vger.kernel.org
      Cc: oleg@redhat.com
      Cc: will.deacon@arm.com
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      62e8a325
  14. 22 9月, 2015 6 次提交
  15. 17 9月, 2015 1 次提交
    • M
      arm/arm64: KVM: Remove 'config KVM_ARM_MAX_VCPUS' · ef748917
      Ming Lei 提交于
      This patch removes config option of KVM_ARM_MAX_VCPUS,
      and like other ARCHs, just choose the maximum allowed
      value from hardware, and follows the reasons:
      
      1) from distribution view, the option has to be
      defined as the max allowed value because it need to
      meet all kinds of virtulization applications and
      need to support most of SoCs;
      
      2) using a bigger value doesn't introduce extra memory
      consumption, and the help text in Kconfig isn't accurate
      because kvm_vpu structure isn't allocated until request
      of creating VCPU is sent from QEMU;
      
      3) the main effect is that the field of vcpus[] in 'struct kvm'
      becomes a bit bigger(sizeof(void *) per vcpu) and need more cache
      lines to hold the structure, but 'struct kvm' is one generic struct,
      and it has worked well on other ARCHs already in this way. Also,
      the world switch frequecy is often low, for example, it is ~2000
      when running kernel building load in VM from APM xgene KVM host,
      so the effect is very small, and the difference can't be observed
      in my test at all.
      
      Cc: Dann Frazier <dann.frazier@canonical.com>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Reviewed-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      ef748917
  16. 16 9月, 2015 3 次提交
    • R
      ARM: Remove ununsed set_irq_flags · eb811129
      Rob Herring 提交于
      Now that all users of set_irq_flags and custom flags are converted to
      genirq functions, the ARM specific set_irq_flags can be removed.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      eb811129
    • T
      genirq: Remove irq argument from irq flow handlers · bd0b9ac4
      Thomas Gleixner 提交于
      Most interrupt flow handlers do not use the irq argument. Those few
      which use it can retrieve the irq number from the irq descriptor.
      
      Remove the argument.
      
      Search and replace was done with coccinelle and some extra helper
      scripts around it. Thanks to Julia for her help!
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      bd0b9ac4
    • P
      KVM: add halt_attempted_poll to VCPU stats · 62bea5bf
      Paolo Bonzini 提交于
      This new statistic can help diagnosing VCPUs that, for any reason,
      trigger bad behavior of halt_poll_ns autotuning.
      
      For example, say halt_poll_ns = 480000, and wakeups are spaced exactly
      like 479us, 481us, 479us, 481us. Then KVM always fails polling and wastes
      10+20+40+80+160+320+480 = 1110 microseconds out of every
      479+481+479+481+479+481+479 = 3359 microseconds. The VCPU then
      is consuming about 30% more CPU than it would use without
      polling.  This would show as an abnormally high number of
      attempted polling compared to the successful polls.
      
      Acked-by: Christian Borntraeger <borntraeger@de.ibm.com<
      Reviewed-by: NDavid Matlack <dmatlack@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      62bea5bf
  17. 12 9月, 2015 1 次提交
    • R
      ARM: 8431/1: fix alignement of __bug_table section entries · a4a5a737
      Robert Jarzmik 提交于
      On old ARM chips, unaligned accesses to memory are not trapped and
      fixed.  On module load, symbols are relocated, and the relocation of
      __bug_table symbols is done on a u32 basis. Yet the section is not
      aligned to a multiple of 4 address, but to a multiple of 2.
      
      This triggers an Oops on pxa architecture, where address 0xbf0021ea
      is the first relocation in the __bug_table section :
        apply_relocate(): pxa3xx_nand: section 13 reloc 0 sym ''
        Unable to handle kernel paging request at virtual address bf0021ea
        pgd = e1cd0000
        [bf0021ea] *pgd=c1cce851, *pte=c1cde04f, *ppte=c1cde01f
        Internal error: Oops: 23 [#1] ARM
        Modules linked in:
        CPU: 0 PID: 606 Comm: insmod Not tainted 4.2.0-rc8-next-20150828-cm-x300+ #887
        Hardware name: CM-X300 module
        task: e1c68700 ti: e1c3e000 task.ti: e1c3e000
        PC is at apply_relocate+0x2f4/0x3d4
        LR is at 0xbf0021ea
        pc : [<c000e7c8>]    lr : [<bf0021ea>]    psr: 80000013
        sp : e1c3fe30  ip : 60000013  fp : e49e8c60
        r10: e49e8fa8  r9 : 00000000  r8 : e49e7c58
        r7 : e49e8c38  r6 : e49e8a58  r5 : e49e8920  r4 : e49e8918
        r3 : bf0021ea  r2 : bf007034  r1 : 00000000  r0 : bf000000
        Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
        Control: 0000397f  Table: c1cd0018  DAC: 00000051
        Process insmod (pid: 606, stack limit = 0xe1c3e198)
        [<c000e7c8>] (apply_relocate) from [<c005ce5c>] (load_module+0x1248/0x1f5c)
        [<c005ce5c>] (load_module) from [<c005dc54>] (SyS_init_module+0xe4/0x170)
        [<c005dc54>] (SyS_init_module) from [<c000a420>] (ret_fast_syscall+0x0/0x38)
      
      Fix this by ensuring entries in __bug_table are all aligned to at least
      of multiple of 4. This transforms a module section  __bug_table as :
      -   [12] __bug_table       PROGBITS        00000000 002232 000018 00   A  0   0  1
      +   [12] __bug_table       PROGBITS        00000000 002232 000018 00   A  0   0  4
      Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Reviewed-by: NDave Martin <Dave.Martin@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      a4a5a737
  18. 11 9月, 2015 4 次提交
    • R
      ARM: domains: add memory dependencies to get_domain/set_domain · 6e8f580d
      Russell King 提交于
      We need to have memory dependencies on get_domain/set_domain to avoid
      the compiler over-optimising these inline assembly instructions.
      
      Loads/stores must not be reordered across a set_domain(), so introduce
      a compiler barrier for that assembly.
      
      The value of get_domain() must not be cached across a set_domain(), but
      we still want to allow the compiler to optimise it away.  Introduce a
      dependency on current_thread_info()->cpu_domain to avoid this; the new
      memory clobber in set_domain() should therefore cause the compiler to
      re-load this.  The other advantage of using this is we should have its
      address in the register set already, or very soon after at most call
      sites.
      Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6e8f580d
    • R
      ARM: domains: thread_info.h no longer needs asm/domains.h · 716ff192
      Russell King 提交于
      As of 1eef5d2f ("ARM: domains: switch to keeping domain value in
      register") we no longer need to include asm/domains.h into
      asm/thread_info.h.  Remove it.
      Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      716ff192
    • C
      dma-mapping: consolidate dma_set_mask · 452e06af
      Christoph Hellwig 提交于
      Almost everyone implements dma_set_mask the same way, although some time
      that's hidden in ->set_dma_mask methods.
      
      This patch consolidates those into a common implementation that either
      calls ->set_dma_mask if present or otherwise uses the default
      implementation.  Some architectures used to only call ->set_dma_mask
      after the initial checks, and those instance have been fixed to do the
      full work.  h8300 implemented dma_set_mask bogusly as a no-ops and has
      been fixed.
      
      Unfortunately some architectures overload unrelated semantics like changing
      the dma_ops into it so we still need to allow for an architecture override
      for now.
      
      [jcmvbkbc@gmail.com: fix xtensa]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      452e06af
    • C
      dma-mapping: consolidate dma_supported · ee196371
      Christoph Hellwig 提交于
      Most architectures just call into ->dma_supported, but some also return 1
      if the method is not present, or 0 if no dma ops are present (although
      that should never happeb). Consolidate this more broad version into
      common code.
      
      Also fix h8300 which inorrectly always returned 0, which would have been
      a problem if it's dma_set_mask implementation wasn't a similarly buggy
      noop.
      
      As a few architectures have much more elaborate implementations, we
      still allow for arch overrides.
      
      [jcmvbkbc@gmail.com: fix xtensa]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ee196371