1. 31 7月, 2018 2 次提交
    • P
      MIPS: generic: Select MIPS_AUTO_PFN_OFFSET · 0211d49e
      Paul Burton 提交于
      Enable CONFIG_MIPS_AUTO_PFN_OFFSET for the generic platform, allowing
      it to avoid wasted book-keeping for pages with addresses lower than the
      physical base address of memory.
      
      This has a minimal impact on kernel text size, with 64r6el_defconfig
      gaining 0.1% in size as reported by bloat-o-meter:
      
        add/remove: 4/1 grow/shrink: 345/13 up/down: 9017/-392 (8625)
        Function                                     old     new   delta
        pcpu_setup_first_chunk                      1444    1780    +336
        pcpu_alloc_first_chunk                       864    1136    +272
        start_kernel                                1064    1288    +224
        initcall_blacklist                           224     372    +148
        try_fill_recv                               2088    2184     +96
        ...
        Total: Before=8457273, After=8465898, chg +0.10%
      
      The gain for systems with large offsets to physical memory & the ability
      to continue using generic kernels on such systems seems well worth this
      small cost.
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Suggested-by: NVladimir Kondratiev <vladimir.kondratiev@intel.com>
      Patchwork: https://patchwork.linux-mips.org/patch/20049/
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      0211d49e
    • P
      MIPS: Allow auto-dection of ARCH_PFN_OFFSET & PHYS_OFFSET · 6c359eb1
      Paul Burton 提交于
      On systems where physical memory begins at a non-zero address, defining
      PHYS_OFFSET (which influences ARCH_PFN_OFFSET) can save us time & memory
      by avoiding book-keeping for pages from address zero to the start of
      memory.
      
      Some MIPS platforms already make use of this, but with the definition of
      PHYS_OFFSET being compile-time constant it hasn't been possible to
      enable this optimization for a kernel which may run on systems with
      varying physical memory base addresses.
      
      Introduce a new Kconfig option CONFIG_MIPS_AUTO_PFN_OFFSET which, when
      enabled, makes ARCH_PFN_OFFSET a variable & detects it from the boot
      memory map (which for example may have been populated from DT). The
      relationship with PHYS_OFFSET is reversed, with PHYS_OFFSET now being
      based on ARCH_PFN_OFFSET. This is because ARCH_PFN_OFFSET is used far
      more often, so avoiding the need for runtime calculation gives us a
      smaller impact on kernel text size (0.1% rather than 0.15% for
      64r6el_defconfig).
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Suggested-by: NVladimir Kondratiev <vladimir.kondratiev@intel.com>
      Patchwork: https://patchwork.linux-mips.org/patch/20048/
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      6c359eb1
  2. 25 7月, 2018 3 次提交
  3. 25 6月, 2018 12 次提交
  4. 20 6月, 2018 1 次提交
    • P
      MIPS: Add support for restartable sequences · 9ea141ad
      Paul Burton 提交于
      Implement support for restartable sequences on MIPS, which requires 3
      simple things:
      
        - Call rseq_handle_notify_resume() on return to userspace if
          TIF_NOTIFY_RESUME is set.
      
        - Call rseq_signal_deliver() to fixup the pre-signal stack frame when
          a signal is delivered whilst executing a restartable sequence
          critical section.
      
        - Select CONFIG_HAVE_RSEQ.
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Reviewed-by: NJames Hogan <jhogan@kernel.org>
      Patchwork: https://patchwork.linux-mips.org/patch/19523/
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      9ea141ad
  5. 15 6月, 2018 1 次提交
  6. 09 5月, 2018 4 次提交
  7. 08 5月, 2018 1 次提交
  8. 23 4月, 2018 1 次提交
  9. 17 4月, 2018 1 次提交
  10. 28 3月, 2018 1 次提交
  11. 26 3月, 2018 1 次提交
  12. 20 2月, 2018 1 次提交
  13. 06 2月, 2018 2 次提交
  14. 02 2月, 2018 1 次提交
  15. 24 1月, 2018 1 次提交
  16. 19 1月, 2018 2 次提交
    • C
      MIPS: Fix typo BIG_ENDIAN to CPU_BIG_ENDIAN · 2e6522c5
      Corentin Labbe 提交于
      MIPS_GENERIC selects some options conditional on BIG_ENDIAN which does
      not exist.
      
      Replace BIG_ENDIAN with CPU_BIG_ENDIAN which is the correct kconfig
      name. Note that BMIPS_GENERIC does the same which confirms that this
      patch is needed.
      
      Fixes: eed0eabd ("MIPS: generic: Introduce generic DT-based board support")
      Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
      Reviewed-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: <stable@vger.kernel.org> # 4.9+
      Patchwork: https://patchwork.linux-mips.org/patch/18495/
      [jhogan@kernel.org: Clean up commit message]
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      2e6522c5
    • J
      MIPS: Fix undefined reference to physical_memsize · f35764e7
      James Hogan 提交于
      Since commit d41e6858 ("MIPS: Kconfig: Set default MIPS system type
      as generic") switched the default platform to the "generic" platform,
      allmodconfig has been failing with the following linker error (among
      other errors):
      
      arch/mips/kernel/vpe-mt.o In function `vpe_run':
      (.text+0x59c): undefined reference to `physical_memsize'
      
      The Lantiq platform already worked around the same issue in commit
      9050d50e ("MIPS: lantiq: Set physical_memsize") by declaring
      physical_memsize with the initial value of 0 (on the assumption that the
      actual memory size will be hard-coded in the loaded VPE firmware), and
      the Malta platform already provided physical_memsize.
      
      Since all other platforms will fail to link with the VPE loader enabled,
      only allow Lantiq and Malta platforms to enable it, by way of a
      SYS_SUPPORTS_VPE_LOADER which is selected by those two platforms and
      which MIPS_VPE_LOADER depends on. SYS_SUPPORTS_MULTITHREADING is now a
      dependency of SYS_SUPPORTS_VPE_LOADER so that Kconfig emits a warning if
      SYS_SUPPORTS_VPE_LOADER is selected without SYS_SUPPORTS_MULTITHREADING.
      
      Fixes: d41e6858 ("MIPS: Kconfig: Set default MIPS system type as generic")
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: John Crispin <john@phrozen.org>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: linux-mips@linux-mips.org
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Patchwork: https://patchwork.linux-mips.org/patch/18453/
      f35764e7
  17. 10 1月, 2018 2 次提交
    • M
      MIPS: BCM47XX Avoid compile error with MIPS allnoconfig · dfe00495
      Matt Redfearn 提交于
      Currently MIPS allnoconfig with CONFIG_BCM47XX=y fails to compile due to
      neither BCM47XX_BCMA nor BCM47XX_SSB being selected. This leads the
      enumeration in arch/mips/include/asm/mach-bcm47xx/bcm47xx.h to be empty,
      and compilation fails:
      
      In file included from arch/mips/bcm47xx/irq.c:32:0:
      ./arch/mips/include/asm/mach-bcm47xx/bcm47xx.h:34:1: error: expected
      identifier before '}' token
       };
       ^
      make[2]: *** [scripts/Makefile.build:314: arch/mips/bcm47xx/irq.o] Error 1
      
      Fix this by ensuring that BCM47XX_SSB is selected if BCM47XX_BCMA is
      not. This allows us to select either system or both, but not neither.
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: James Hogan <james.hogan@mips.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/17703/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      dfe00495
    • C
      dma-mapping: move swiotlb arch helpers to a new header · ea8c64ac
      Christoph Hellwig 提交于
      phys_to_dma, dma_to_phys and dma_capable are helpers published by
      architecture code for use of swiotlb and xen-swiotlb only.  Drivers are
      not supposed to use these directly, but use the DMA API instead.
      
      Move these to a new asm/dma-direct.h helper, included by a
      linux/dma-direct.h wrapper that provides the default linear mapping
      unless the architecture wants to override it.
      
      In the MIPS case the existing dma-coherent.h is reused for now as
      untangling it will take a bit of work.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Acked-by: NRobin Murphy <robin.murphy@arm.com>
      ea8c64ac
  18. 14 11月, 2017 2 次提交
  19. 09 11月, 2017 1 次提交