17 Oct, 2020

1 commit

  • Pull MIPS updates from Thomas Bogendoerfer:

    - removed support for PNX833x alias NXT_STB22x

    - included Ingenic SoC support into generic MIPS kernels

    - added support for new Ingenic SoCs

    - converted workaround selection to use Kconfig

    - replaced old boot mem functions by memblock_*

    - enabled COP2 usage in kernel for Loongson64 to make use
    of 16byte load/stores possible

    - cleanups and fixes

    * tag 'mips_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (92 commits)
    MIPS: DEC: Restore bootmem reservation for firmware working memory area
    MIPS: dec: fix section mismatch
    bcm963xx_tag.h: fix duplicated word
    mips: ralink: enable zboot support
    MIPS: ingenic: Remove CPU_SUPPORTS_HUGEPAGES
    MIPS: cpu-probe: remove MIPS_CPU_BP_GHIST option bit
    MIPS: cpu-probe: introduce exclusive R3k CPU probe
    MIPS: cpu-probe: move fpu probing/handling into its own file
    MIPS: replace add_memory_region with memblock
    MIPS: Loongson64: Clean up numa.c
    MIPS: Loongson64: Select SMP in Kconfig to avoid build error
    mips: octeon: Add Ubiquiti E200 and E220 boards
    MIPS: SGI-IP28: disable use of ll/sc in kernel
    MIPS: tx49xx: move tx4939_add_memory_regions into only user
    MIPS: pgtable: Remove used PAGE_USERIO define
    MIPS: alchemy: Share prom_init implementation
    MIPS: alchemy: Fix build breakage, if TOUCHSCREEN_WM97XX is disabled
    MIPS: process: include exec.h header in process.c
    MIPS: process: Add prototype for function arch_dup_task_struct
    MIPS: idle: Add prototype for function check_wait
    ...

    Linus Torvalds
     

16 Oct, 2020

1 commit

  • Pull dma-mapping updates from Christoph Hellwig:

    - rework the non-coherent DMA allocator

    - move private definitions out of

    - lower CMA_ALIGNMENT (Paul Cercueil)

    - remove the omap1 dma address translation in favor of the common code

    - make dma-direct aware of multiple dma offset ranges (Jim Quinlan)

    - support per-node DMA CMA areas (Barry Song)

    - increase the default seg boundary limit (Nicolin Chen)

    - misc fixes (Robin Murphy, Thomas Tai, Xu Wang)

    - various cleanups

    * tag 'dma-mapping-5.10' of git://git.infradead.org/users/hch/dma-mapping: (63 commits)
    ARM/ixp4xx: add a missing include of dma-map-ops.h
    dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling
    dma-direct: factor out a dma_direct_alloc_from_pool helper
    dma-direct check for highmem pages in dma_direct_alloc_pages
    dma-mapping: merge into
    dma-mapping: move large parts of to kernel/dma
    dma-mapping: move dma-debug.h to kernel/dma/
    dma-mapping: remove
    dma-mapping: merge into
    dma-contiguous: remove dma_contiguous_set_default
    dma-contiguous: remove dev_set_cma_area
    dma-contiguous: remove dma_declare_contiguous
    dma-mapping: split
    cma: decrease CMA_ALIGNMENT lower limit to 2
    firewire-ohci: use dma_alloc_pages
    dma-iommu: implement ->alloc_noncoherent
    dma-mapping: add new {alloc,free}_noncoherent dma_map_ops methods
    dma-mapping: add a new dma_alloc_pages API
    dma-mapping: remove dma_cache_sync
    53c700: convert to dma_alloc_noncoherent
    ...

    Linus Torvalds
     

12 Oct, 2020

1 commit


23 Sep, 2020

1 commit

  • It was missed when I was forking Loongson2ef from Loongson64 but
    should be applied to Loongson2ef as march=loongson2f
    will also enable Loongson MMI in GCC-9+.

    Signed-off-by: Jiaxun Yang
    Fixes: 71e2f4dd5a65 ("MIPS: Fork loongson2ef from loongson64")
    Reported-by: Thomas Bogendoerfer
    Cc: stable@vger.kernel.org # v5.8+
    Signed-off-by: Thomas Bogendoerfer

    Jiaxun Yang
     

11 Sep, 2020

2 commits


22 Jun, 2020

1 commit

  • Firstly, Loongson-2EF support ll/sc instructions, but
    doesn't need fix-loongson3-llsc compile option.

    Secondly, fix-loongson3-llsc will cause kernel startup
    fail at futex_init, because compiler will add 'sync' before
    'll', which will affect __ex_table.
    futex_init will pass NULL uaddr parameter to
    futex_atomic_cmpxchg_inatomic.
    futex_atomic_cmpxchg_inatomic will access uaddr directly,
    which will cause page fault exception, the exception should be
    handled by __ex_table's nextinsn if the exception insn exsit in
    __ex_table. Because __ex_table is affected by compiler,
    the exception can not be handled, and
    futex_atomic_cmpxchg_inatomic will crash.

    Error code as below:
    __ex_table.insn = 1b, which is 'sync' compiled with
    fix-loongson3-llsc, but the actual exception instrction is ll.
    So, do_page_fault will not find the correct inst in __ex_table, and
    can not handle this exception.

    "1: "user_ll("%1", "%3")" \n"
    " bne %1, %z4, 3f \n"
    " .set pop \n"
    " move $1, %z5 \n"
    " .set "MIPS_ISA_ARCH_LEVEL" \n"
    "2: "user_sc("$1", "%2")" \n"
    " beqz $1, 1b \n"
    "3: " __SYNC_ELSE(full, loongson3_war, __WEAK_LLSC_MB) "\n"
    " .insn \n"
    " .set pop \n"
    " .section .fixup,\"ax\" \n"
    "4: li %0, %6 \n"
    " j 3b \n"
    " .previous \n"
    " .section __ex_table,\"a\" \n"
    " "__UA_ADDR "\t1b, 4b \n"
    " "__UA_ADDR "\t2b, 4b \n"
    " .previous

    Signed-off-by: Lichao Liu
    Reviewed-by: Jiaxun Yang
    Signed-off-by: Thomas Bogendoerfer

    Lichao Liu
     

24 May, 2020

1 commit

  • The exception handler subroutines are declared as a single char, but
    when copied to the required addresses the copy length is 0x80.

    When range checks are enabled for memcpy() this results in a build
    failure, with error messages such as:

    In file included from arch/mips/mti-malta/malta-init.c:15:
    In function 'memcpy',
    inlined from 'mips_nmi_setup' at arch/mips/mti-malta/malta-init.c:98:2:
    include/linux/string.h:376:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
    376 | __read_overflow2();
    | ^~~~~~~~~~~~~~~~~~

    Change the declarations to use type char[].

    Signed-off-by: Ben Hutchings
    Signed-off-by: YunQiang Su
    Signed-off-by: Thomas Bogendoerfer

    Ben Hutchings
     

13 May, 2020

1 commit


16 Apr, 2020

1 commit

  • As platforms are moving to COMMON_CLK in general, loongson2ef
    stuck out as something that has a private implementation but
    does not actually use it except for setting the frequency of
    the CPU itself from the loongson2_cpufreq driver.

    Change that driver to call the register setting function directly
    and remove the rest of the stub implementation.

    Signed-off-by: Arnd Bergmann
    Reviewed-by: Philippe Mathieu-Daudé
    Signed-off-by: Thomas Bogendoerfer

    Arnd Bergmann
     

16 Mar, 2020

1 commit

  • Recently all usages of setup_irq() was replaced by request_irq().
    request_irq() does a few sanity checks that were not done in
    setup_irq(), if they fail irq registration will fail. One of the check
    is to ensure that non-NULL dev_id is passed in the case of shared irq.
    This caused malta on qemu to hang.

    Fix it by passing handler as dev_id to all request_irq()'s that are
    shared. For sni, instead of passing non-NULL dev_id, remove shared irq
    flags.

    Fixes: ac8fd122e070 ("MIPS: Replace setup_irq() by request_irq()")
    Reported-by: Nathan Chancellor
    Suggested-by: Thomas Bogendoerfer
    Signed-off-by: afzal mohammed
    Tested-by: Guenter Roeck
    Tested-by: Nathan Chancellor
    Signed-off-by: Thomas Bogendoerfer

    afzal mohammed
     

05 Mar, 2020

1 commit

  • request_irq() is preferred over setup_irq(). Invocations of setup_irq()
    occur after memory allocators are ready.

    Per tglx[1], setup_irq() existed in olden days when allocators were not
    ready by the time early interrupts were initialized.

    Hence replace setup_irq() by request_irq().

    remove_irq() has been replaced by free_irq() as well.

    There were build error's during previous version, couple of which was
    reported by kbuild test robot of which one was reported
    by Thomas Bogendoerfer as well. There were a
    few more issues including build errors, those also have been fixed.

    [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos

    Signed-off-by: afzal mohammed
    Signed-off-by: Thomas Bogendoerfer

    afzal mohammed
     

01 Feb, 2020

1 commit

  • Pull MIPS changes from Paul Burton:
    "Nothing too big or scary in here:

    - Support mremap() for the VDSO, primarily to allow CRIU to restore
    the VDSO to its checkpointed location.

    - Restore the MIPS32 cBPF JIT, after having reverted the enablement
    of the eBPF JIT for MIPS32 systems in the 5.5 cycle.

    - Improve cop0 counter synchronization behaviour whilst onlining CPUs
    by running with interrupts disabled.

    - Better match FPU behaviour when emulating multiply-accumulate
    instructions on pre-r6 systems that implement IEEE754-2008 style
    MACs.

    - Loongson64 kernels now build using the MIPS64r2 ISA, allowing them
    to take advantage of instructions introduced by r2.

    - Support for the Ingenic X1000 SoC & the really nice little CU Neo
    development board that's using it.

    - Support for WMAC on GARDENA Smart Gateway devices.

    - Lots of cleanup & refactoring of SGI IP27 (Origin 2*) support in
    preparation for introducing IP35 (Origin 3*) support.

    - Various Kconfig & Makefile cleanups"

    * tag 'mips_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (60 commits)
    MIPS: PCI: Add detection of IOC3 on IO7, IO8, IO9 and Fuel
    MIPS: Loongson64: Disable exec hazard
    MIPS: Loongson64: Bump ISA level to MIPSR2
    MIPS: Make DIEI support as a config option
    MIPS: OCTEON: octeon-irq: fix spelling mistake "to" -> "too"
    MIPS: asm: local: add barriers for Loongson
    MIPS: Loongson64: Select mac2008 only feature
    MIPS: Add MAC2008 Support
    Revert "MIPS: Add custom serial.h with BASE_BAUD override for generic kernel"
    MIPS: sort MIPS and MIPS_GENERIC Kconfig selects alphabetically (again)
    MIPS: make CPU_HAS_LOAD_STORE_LR opt-out
    MIPS: generic: don't unconditionally select PINCTRL
    MIPS: don't explicitly select LIBFDT in Kconfig
    MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts
    MIPS: SGI-IP30: Check for valid pointer before using it
    MIPS: syscalls: fix indentation of the 'SYSNR' message
    MIPS: boot: fix typo in 'vmlinux.lzma.its' target
    MIPS: fix indentation of the 'RELOCS' message
    dt-bindings: Document loongson vendor-prefix
    MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi.
    ...

    Linus Torvalds
     

10 Jan, 2020

1 commit


06 Jan, 2020

1 commit


12 Nov, 2019

3 commits


02 Nov, 2019

2 commits

  • Remove unrelevent macros, defines and codes from loongson2ef mach.
    Also rename some defines to match new naming.

    Signed-off-by: Jiaxun Yang
    Signed-off-by: Paul Burton
    Cc: linux-mips@vger.kernel.org
    Cc: paul.burton@mips.com

    Jiaxun Yang
     
  • As later model of GSx64 family processors including 2-series-soc have
    similar design with initial loongson3a while loongson2e/f seems less
    identical, we separate loongson2e/f support code out of mach-loongson64
    to make our life easier.

    This patch contains mostly file moving works.

    Signed-off-by: Jiaxun Yang
    [paulburton@kernel.org: Squash in the MAINTAINERS updates]
    Signed-off-by: Paul Burton
    Cc: linux-mips@vger.kernel.org
    Cc: paul.burton@mips.com

    Jiaxun Yang