1. 04 9月, 2017 32 次提交
  2. 02 9月, 2017 1 次提交
  3. 30 8月, 2017 7 次提交
    • P
      clocksource: mips-gic-timer: Use new GIC accessor functions · e07127a0
      Paul Burton 提交于
      Switch from calling functions exported by the GIC interrupt controller
      to using new accessors provided by asm/mips-gic.h. This will allow the
      counter-handling functionality to be removed from the interrupt
      controller driver, where it doesn't really belong, and also allow for
      inlining of the accesses to the GIC.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17021/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      e07127a0
    • P
      MIPS: GIC: Introduce asm/mips-gic.h with accessor functions · 582e2b4a
      Paul Burton 提交于
      This patch introduces a new header providing accessor functions for the
      MIPS Global Interrupt Controller (GIC) mirroring those provided for the
      other 2 components of the MIPS Coherent Processing System (CPS) - the
      Coherence Manager (CM) & Cluster Power Controller (CPC).
      
      This header makes use of the new standardised CPS accessor macros where
      possible, but does require some custom accessors for cases where we have
      either a bit or a register per interrupt.
      
      A major advantage of this over the existing
      include/linux/irqchip/mips-gic.h definitions is that code performing
      accesses can become much simpler, for example this:
      
        gic_update_bits(GIC_REG(SHARED, GIC_SH_SET_TRIGGER) +
                        GIC_INTR_OFS(intr), 1ul << GIC_INTR_BIT(intr),
                        (unsigned long)trig << GIC_INTR_BIT(intr));
      
      ...can become simply:
      
        change_gic_trig(intr, trig);
      
      The accessors handle 32 vs 64 bit in the same way as for CM & CPC code,
      which means that GIC code will also not need to worry about the access
      size in most cases. They are also accessible outside of
      drivers/irqchip/irq-mips-gic.c which will allow for simplification in
      the use of the non-interrupt portions of the GIC (eg. counters) which
      currently require the interrupt controller driver to expose helper
      functions for access.
      
      This patch doesn't change any existing code over to use the new
      accessors yet, since a wholesale change would be invasive & difficult to
      review. Instead follow-on patches will convert code piecemeal to use
      this new header. The one change to existing code is to rename gic_base
      to mips_gic_base & make it global, in order to fit in with the naming
      expected by the standardised CPS accessor macros.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17020/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      582e2b4a
    • J
      irqchip: mips-gic: SYNC after enabling GIC region · a0ffec3d
      James Hogan 提交于
      A SYNC is required between enabling the GIC region and actually trying
      to use it, even if the first access is a read, otherwise its possible
      depending on the timing (and in my case depending on the precise
      alignment of certain kernel code) to hit CM bus errors on that first
      access.
      
      Add the SYNC straight after setting the GIC base.
      
      [paul.burton@imgtec.com:
        Changes later in this series increase our likelihood of hitting this
        by reducing the amount of code that runs between enabling the GIC &
        accessing it.]
      
      Fixes: a7057270 ("irqchip: mips-gic: Add device-tree support")
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17019/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a0ffec3d
    • C
      MIPS: Don't use dma_cache_sync to implement fd_cacheflush · 1dd71588
      Christoph Hellwig 提交于
      The floppy drivers doesn't otherwise use the DMA API, so indirecting
      through it just for cache flushing in MIPS-specific code just call
      dma_cache_wback_inv directly.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: iommu@lists.linux-foundation.org
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: x86@kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-ia64@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-xtensa@linux-xtensa.org
      Cc: linux-sh@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/17183/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      1dd71588
    • P
      MIPS: generic: Bump default NR_CPUS to 16 · c2c03291
      Paul Burton 提交于
      In generic_defconfig set CONFIG_NR_CPUS to 16 rather than 2, which is a
      rather too low limit for many modern day MIPS systems.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/16949/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c2c03291
    • P
      MIPS: generic: Don't explicitly disable CONFIG_USB_SUPPORT · f8bfffc1
      Paul Burton 提交于
      Leave CONFIG_USB_SUPPORT at its default, allowing board config fragments
      to make use of USB drivers without needing to override it & trigger
      warnings from merge_config.sh.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/16948/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f8bfffc1
    • P
      MIPS: Make CONFIG_MIPS_MT_SMP default y · 5cbf9688
      Paul Burton 提交于
      On systems that support MT ASE multithreading (ie. VPEs) we are very
      likely to want to include that support as default. Rather than setting
      it in various defconfigs, simply make CONFIG_MIPS_MT_SMP default y such
      that systems which select CONFIG_SYS_SUPPORTS_MULTITHREADING get it by
      default.
      
      As well as allowing us to remove the selection of CONFIG_MIPS_MT_SMP
      from various defconfigs, this also allows the generated generic
      defconfigs which derive from generic_defconfig to automatically gain
      support for MT ASE SMP when building for a suitable (pre-MIPSr6) ISA.
      
      For malta_kvm_guest_defconfig CONFIG_MIPS_MT_SMP is explicitly disabled
      since enabling SMP implicitly disables CONFIG_KVM_GUEST, which depends
      on CONFIG_BROKEN_ON_SMP.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/16947/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5cbf9688