1. 11 Nov, 2019 2 commits
    • Huacai Chen's avatar
      MIPS: Loongson: Unify LOONGSON3/LOONGSON64 Kconfig usage · caed1d1b
      Huacai Chen authored
      There are mixed LOONGSON3/LOONGSON64 usages in recently changes, let's
      establish some rules:
      
      1, In Kconfig symbols, we only use CPU_LOONGSON64, MACH_LOONGSON64 and
      SYS_HAS_CPU_LOONGSON64, all other derived symbols use "LOONGSON3" since
      they all not widely-used symbols and sometimes not suitable for all
      64-bit Loongson processors. E.g., we use symbols LOONGSON3_ENHANCEMENT,
      CPU_LOONGSON3_WORKAROUNDS, etc.
      
      2, Hide GSx64/GSx64E in Kconfig title since it is not useful for
      general users. However, in the full description we use a more detailed
      manner. E.g., GS264/GS464/GS464E/GS464V.
      
      All Kconfig titles and descriptions of Loongson processors and machines
      have also been updated in this patch for consistency.
      Signed-off-by: default avatarHuacai Chen <chenhc@lemote.com>
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-mips@vger.kernel.org
      Cc: Fuxin Zhang <zhangfx@lemote.com>
      Cc: Zhangjin Wu <wuzhangjin@gmail.com>
      Cc: Huacai Chen <chenhuacai@gmail.com>
      caed1d1b
    • Huacai Chen's avatar
      MIPS: Loongson: Rename LOONGSON1 to LOONGSON32 · b2afb64c
      Huacai Chen authored
      Now old Loongson-2E/2F use LOONGSON2EF and will be removed in future,
      newer Loongson-2/3 use LOONGSON64. So rename LOONGSON1 to LOONGSON32
      will make the naming style more unified.
      Signed-off-by: default avatarHuacai Chen <chenhc@lemote.com>
      [paulburton@kernel.org: Fix checkpatch whitespace warning in irqflags.h]
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-mips@vger.kernel.org
      Cc: Fuxin Zhang <zhangfx@lemote.com>
      Cc: Zhangjin Wu <wuzhangjin@gmail.com>
      Cc: Huacai Chen <chenhuacai@gmail.com>
      b2afb64c
  2. 04 Nov, 2019 1 commit
  3. 01 Nov, 2019 10 commits
  4. 31 Oct, 2019 1 commit
  5. 24 Oct, 2019 9 commits
    • Thomas Bogendoerfer's avatar
      MIPS: include: remove unsued header file asm/sgi/sgi.h · 2409839a
      Thomas Bogendoerfer authored
      asm/sgi/sgi.h is unused, time to remove it.
      Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      2409839a
    • Paul Burton's avatar
      MIPS: tlbex: Fix build_restore_pagemask KScratch restore · b42aa3fd
      Paul Burton authored
      build_restore_pagemask() will restore the value of register $1/$at when
      its restore_scratch argument is non-zero, and aims to do so by filling a
      branch delay slot. Commit 0b24cae4 ("MIPS: Add missing EHB in mtc0
      -> mfc0 sequence.") added an EHB instruction (Execution Hazard Barrier)
      prior to restoring $1 from a KScratch register, in order to resolve a
      hazard that can result in stale values of the KScratch register being
      observed. In particular, P-class CPUs from MIPS with out of order
      execution pipelines such as the P5600 & P6600 are affected.
      
      Unfortunately this EHB instruction was inserted in the branch delay slot
      causing the MFC0 instruction which performs the restoration to no longer
      execute along with the branch. The result is that the $1 register isn't
      actually restored, ie. the TLB refill exception handler clobbers it -
      which is exactly the problem the EHB is meant to avoid for the P-class
      CPUs.
      
      Similarly build_get_pgd_vmalloc() will restore the value of $1/$at when
      its mode argument equals refill_scratch, and suffers from the same
      problem.
      
      Fix this by in both cases moving the EHB earlier in the emitted code.
      There's no reason it needs to immediately precede the MFC0 - it simply
      needs to be between the MTC0 & MFC0.
      
      This bug only affects Cavium Octeon systems which use
      build_fast_tlb_refill_handler().
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Fixes: 0b24cae4 ("MIPS: Add missing EHB in mtc0 -> mfc0 sequence.")
      Cc: Dmitry Korotin <dkorotin@wavecomp.com>
      Cc: stable@vger.kernel.org # v3.15+
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      b42aa3fd
    • Thomas Bogendoerfer's avatar
      MIPS: SGI-IP27: reduce ARC usage to a minimum · e9422427
      Thomas Bogendoerfer authored
      IP27 uses ARC prom only for parsing prom arguments and has a hack
      for IP27 to make the ARC code behave. By introducing config symbol
      ARC_CMDLINE_ONLY IP27 only drags in ARC cmdline parsing and does
      everything else in IP27 specific code.
      Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      e9422427
    • Thomas Bogendoerfer's avatar
      MIPS: arc: use function argument for passing argc/argv to prom_init_cmdline · 7b16831d
      Thomas Bogendoerfer authored
      prom_argc and prom_argv are only used by prom_init_cmdline(), so
      we could pass them directly as function argument.
      Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      7b16831d
    • Thomas Bogendoerfer's avatar
      MIPS: arc: remove unused stuff · cbd09241
      Thomas Bogendoerfer authored
      remove unused _prom_envp and prom_argc macro.
      Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      cbd09241
    • Thomas Bogendoerfer's avatar
      MIPS: SGI-IP27: move registering of smp ops into IP27 specific code · c823f416
      Thomas Bogendoerfer authored
      Calling register_smp_ops() in plat_mem_setup() is still early enough.
      So by doing this we could remove the ugly #ifdef CONFIG_SGI_IP27 in
      fw/arc/init.c.
      Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      c823f416
    • Thomas Bogendoerfer's avatar
      MIPS: SGI-IP27: collect externs in new header file · 249be563
      Thomas Bogendoerfer authored
      IP27 code has a few externs distributed over .c files. Collect them
      together into one commcon header file.
      Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      249be563
    • Jonas Gorski's avatar
      MIPS: bmips: mark exception vectors as char arrays · e4f5cb1a
      Jonas Gorski authored
      The vectors span more than one byte, so mark them as arrays.
      
      Fixes the following build error when building when using GCC 8.3:
      
      In file included from ./include/linux/string.h:19,
                       from ./include/linux/bitmap.h:9,
                       from ./include/linux/cpumask.h:12,
                       from ./arch/mips/include/asm/processor.h:15,
                       from ./arch/mips/include/asm/thread_info.h:16,
                       from ./include/linux/thread_info.h:38,
                       from ./include/asm-generic/preempt.h:5,
                       from ./arch/mips/include/generated/asm/preempt.h:1,
                       from ./include/linux/preempt.h:81,
                       from ./include/linux/spinlock.h:51,
                       from ./include/linux/mmzone.h:8,
                       from ./include/linux/bootmem.h:8,
                       from arch/mips/bcm63xx/prom.c:10:
      arch/mips/bcm63xx/prom.c: In function 'prom_init':
      ./arch/mips/include/asm/string.h:162:11: error: '__builtin_memcpy' forming offset [2, 32] is out of the bounds [0, 1] of object 'bmips_smp_movevec' with type 'char' [-Werror=array-bounds]
         __ret = __builtin_memcpy((dst), (src), __len); \
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      arch/mips/bcm63xx/prom.c:97:3: note: in expansion of macro 'memcpy'
         memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20);
         ^~~~~~
      In file included from arch/mips/bcm63xx/prom.c:14:
      ./arch/mips/include/asm/bmips.h:80:13: note: 'bmips_smp_movevec' declared here
       extern char bmips_smp_movevec;
      
      Fixes: 18a1eef9 ("MIPS: BMIPS: Introduce bmips.h")
      Signed-off-by: default avatarJonas Gorski <jonas.gorski@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      e4f5cb1a
    • Rikard Falkeborn's avatar
      MIPS: Loongson: Fix GENMASK misuse · e02d026f
      Rikard Falkeborn authored
      Arguments are supposed to be ordered high then low.
      
      Fixes: 6a6f9b7d ("MIPS: Loongson: Add CFUCFG&CSR support")
      Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
      Reviewed-by: default avatarHuacai Chen <chenhc@lemote.com>
      Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
      Cc: chenhuacai@gmail.com
      Cc: jhogan@kernel.org
      Cc: jiaxun.yang@flygoat.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-mips@vger.kernel.org
      Cc: paul.burton@mips.com
      Cc: ralf@linux-mips.org
      Cc: wuzhangjin@gmail.com
      Cc: zhangfx@lemote.com
      e02d026f
  6. 18 Oct, 2019 2 commits
  7. 13 Oct, 2019 15 commits