1. 13 10月, 2020 2 次提交
  2. 12 10月, 2020 1 次提交
    • T
      MIPS: Loongson64: Select SMP in Kconfig to avoid build error · 1062fc45
      Tiezhu Yang 提交于
      In the current code, CONFIG_SMP can be set as N by user on the Loongson
      platform, then there exists the following build error under !CONFIG_SMP:
      
        CC      arch/mips/kernel/asm-offsets.s
      In file included from ./include/linux/gfp.h:9:0,
                       from ./include/linux/xarray.h:14,
                       from ./include/linux/radix-tree.h:18,
                       from ./include/linux/fs.h:15,
                       from ./include/linux/compat.h:17,
                       from arch/mips/kernel/asm-offsets.c:12:
      ./include/linux/topology.h: In function 'numa_node_id':
      ./include/linux/topology.h:119:2: error: implicit declaration of function 'cpu_logical_map' [-Werror=implicit-function-declaration]
        return cpu_to_node(raw_smp_processor_id());
        ^
      cc1: some warnings being treated as errors
      scripts/Makefile.build:117: recipe for target 'arch/mips/kernel/asm-offsets.s' failed
      make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1
      
      Select SMP in Kconfig to avoid the above build error and then remove
      CONFIG_SMP=y in loongson3_defconfig.
      Signed-off-by: NTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      1062fc45
  3. 27 9月, 2020 1 次提交
  4. 18 9月, 2020 4 次提交
  5. 08 9月, 2020 7 次提交
  6. 03 9月, 2020 2 次提交
  7. 24 8月, 2020 1 次提交
  8. 06 8月, 2020 1 次提交
    • M
      MIPS: SGI-IP27: always enable NUMA in Kconfig · 6c86a302
      Mike Rapoport 提交于
      When a configuration has NUMA disabled and SGI_IP27 enabled, the build
      fails:
      
        CC      kernel/bounds.s
        CC      arch/mips/kernel/asm-offsets.s
      In file included from arch/mips/include/asm/topology.h:11,
                       from include/linux/topology.h:36,
                       from include/linux/gfp.h:9,
                       from include/linux/slab.h:15,
                       from include/linux/crypto.h:19,
                       from include/crypto/hash.h:11,
                       from include/linux/uio.h:10,
                       from include/linux/socket.h:8,
                       from include/linux/compat.h:15,
                       from arch/mips/kernel/asm-offsets.c:12:
      include/linux/topology.h: In function 'numa_node_id':
      arch/mips/include/asm/mach-ip27/topology.h:16:27: error: implicit declaration of function 'cputonasid'; did you mean 'cpu_vpe_id'? [-Werror=implicit-function-declaration]
       #define cpu_to_node(cpu) (cputonasid(cpu))
                                 ^~~~~~~~~~
      include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node'
        return cpu_to_node(raw_smp_processor_id());
               ^~~~~~~~~~~
      include/linux/topology.h: In function 'cpu_cpu_mask':
      arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data' [-Werror=implicit-function-declaration]
            &hub_data(node)->h_cpus)
             ^~~~~~~~
      include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
        return cpumask_of_node(cpu_to_node(cpu));
               ^~~~~~~~~~~~~~~
      arch/mips/include/asm/mach-ip27/topology.h:19:21: error: invalid type argument of '->' (have 'int')
            &hub_data(node)->h_cpus)
                           ^~
      include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
        return cpumask_of_node(cpu_to_node(cpu));
               ^~~~~~~~~~~~~~~
      
      Before switch from discontigmem to sparsemem, there always was
      CONFIG_NEED_MULTIPLE_NODES=y because it was selected by DISCONTIGMEM.
      Without DISCONTIGMEM it is possible to have SPARSEMEM without NUMA for
      SGI_IP27 and as many things there rely on custom node definition, the
      build breaks.
      
      As Thomas noted "... there are right now too many places in IP27 code,
      which assumes NUMA enabled", the simplest solution would be to always
      enable NUMA for SGI-IP27 builds.
      Reported-by: Nkernel test robot <lkp@intel.com>
      Fixes: 397dc00e ("mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM")
      Cc: stable@vger.kernel.org
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      6c86a302
  9. 04 8月, 2020 1 次提交
  10. 28 7月, 2020 1 次提交
    • P
      MIPS: Remove legacy MIPS_MACHINE option · a4aec0f3
      Paul Cercueil 提交于
      The CONFIG_MIPS_MACHINE option is dead code that hasn't been used in
      years. The Kconfig option is not selected anywhere, and the
      <asm/mips_machine.h> is not included anywhere either.
      
      To make things worse, for years it co-existed with a separate MIPS
      machine implementation as <asm/machine.h>. The two defined the
      'mips_machine' structure with different fields, and the 'MIPS_MACHINE'
      macro with different parameters. The two used the same memory area
      (defined by the linker script) to store data, and you could totally use
      the two at the same time for all kinds of funny results.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      a4aec0f3
  11. 24 7月, 2020 1 次提交
  12. 19 7月, 2020 1 次提交
  13. 16 7月, 2020 1 次提交
  14. 10 7月, 2020 1 次提交
  15. 05 7月, 2020 1 次提交
  16. 14 6月, 2020 1 次提交
    • M
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada 提交于
      Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over
      '---help---'"), the number of '---help---' has been gradually
      decreasing, but there are still more than 2400 instances.
      
      This commit finishes the conversion. While I touched the lines,
      I also fixed the indentation.
      
      There are a variety of indentation styles found.
      
        a) 4 spaces + '---help---'
        b) 7 spaces + '---help---'
        c) 8 spaces + '---help---'
        d) 1 space + 1 tab + '---help---'
        e) 1 tab + '---help---'    (correct indentation)
        f) 1 tab + 1 space + '---help---'
        g) 1 tab + 2 spaces + '---help---'
      
      In order to convert all of them to 1 tab + 'help', I ran the
      following commend:
      
        $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624
  17. 05 6月, 2020 1 次提交
  18. 04 6月, 2020 1 次提交
    • M
      mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option · 3f08a302
      Mike Rapoport 提交于
      CONFIG_HAVE_MEMBLOCK_NODE_MAP is used to differentiate initialization of
      nodes and zones structures between the systems that have region to node
      mapping in memblock and those that don't.
      
      Currently all the NUMA architectures enable this option and for the
      non-NUMA systems we can presume that all the memory belongs to node 0 and
      therefore the compile time configuration option is not required.
      
      The remaining few architectures that use DISCONTIGMEM without NUMA are
      easily updated to use memblock_add_node() instead of memblock_add() and
      thus have proper correspondence of memblock regions to NUMA nodes.
      
      Still, free_area_init_node() must have a backward compatible version
      because its semantics with and without CONFIG_HAVE_MEMBLOCK_NODE_MAP is
      different.  Once all the architectures will use the new semantics, the
      entire compatibility layer can be dropped.
      
      To avoid addition of extra run time memory to store node id for
      architectures that keep memblock but have only a single node, the node id
      field of the memblock_region is guarded by CONFIG_NEED_MULTIPLE_NODES and
      the corresponding accessors presume that in those cases it is always 0.
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Tested-by: Hoan Tran <hoan@os.amperecomputing.com>	[arm64]
      Acked-by: Catalin Marinas <catalin.marinas@arm.com>	[arm64]
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Brian Cain <bcain@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Guan Xuetao <gxt@pku.edu.cn>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Ley Foon Tan <ley.foon.tan@intel.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nick Hu <nickhu@andestech.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Link: http://lkml.kernel.org/r/20200412194859.12663-4-rppt@kernel.orgSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3f08a302
  19. 27 5月, 2020 2 次提交
  20. 24 5月, 2020 1 次提交
    • W
      MIPS: emulate CPUCFG instruction on older Loongson64 cores · ec7a9318
      WANG Xuerui 提交于
      CPUCFG is the instruction for querying processor characteristics on
      newer Loongson processors, much like CPUID of x86. Since the instruction
      is supposedly designed to provide a unified way to do feature detection
      (without having to, for example, parse /proc/cpuinfo which is too
      heavyweight), it is important to provide compatibility for older cores
      without native support. Fortunately, most of the fields can be
      synthesized without changes to semantics. Performance is not really big
      a concern, because feature detection logic is not expected to be
      invoked very often in typical userland applications.
      
      The instruction can't be emulated on LOONGSON_2EF cores, according to
      FlyGoat's experiments. Because the LWC2 opcode is assigned to other
      valid instructions on 2E and 2F, no RI exception is raised for us to
      intercept. So compatibility is only extended back furthest to
      Loongson-3A1000. Loongson-2K is covered too, as it is basically a remix
      of various blocks from the 3A/3B models from a kernel perspective.
      
      This is lightly based on Loongson's work on their Linux 3.10 fork, for
      being the authority on the right feature flags to fill in, where things
      aren't otherwise discoverable.
      Signed-off-by: NWANG Xuerui <git@xen0n.name>
      Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
      Cc: Tiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      ec7a9318
  21. 22 5月, 2020 3 次提交
    • S
      mips: csrc-r4k: Mark R4K timer as unstable if CPU freq changes · 38586428
      Serge Semin 提交于
      Commit 07d69579 ("MIPS: Don't register r4k sched clock when CPUFREQ
      enabled") disabled the r4k-clock usage for scheduler ticks counting due
      to the scheduler being non-tolerant for unstable clocks sources. For the
      same reason the clock should be used in the system clocksource framework
      with care. As soon as CPU frequency changes the clocksource framework
      should be notified about this by marking the R4K timer being unstable
      (which it really is, since the ticks rate has been changed synchronously
      with the CPU frequency).
      Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      38586428
    • S
      mips: Add MIPS Warrior P5600 support · 281e3aea
      Serge Semin 提交于
      This is a MIPS32 Release 5 based IP core with XPA, EVA, dual/quad issue
      exec pipes, MMU with two-levels TLB, UCA, MSA, MDU core level features
      and system level features like up to six P5600 calculation cores, CM2
      with L2 cache, IOCU/IOMMU (though might be unused depending on the
      system-specific IP core configuration), GIC, CPC, virtualisation module,
      eJTAG and PDtrace.
      
      As being MIPS32 Release 5 based core it provides all the features
      available by the CPU_MIPS32_R5 config, while adding a few more like
      UCA attribute support, availability of CPU-freq (by means of L2/CM
      clock ratio setting), EI/VI GIC modes detection at runtime.
      
      In addition to this if P5600 architecture is enabled modern GNU GCC
      provides a specific tuning for P5600 processors with respect to the
      classic MIPS32 Release 5. First of all branch-likely avoidance is
      activated only when the code is compiled with the speed optimization
      (avoidance is always enabled for the pure MIPS32 Release 5
      architecture). Secondly the madd/msub avoidance is enabled since
      madd/msub utilization isn't profitable due to overhead of getting the
      result out of the HI/LO registers. Multiply-accumulate instructions are
      activated and utilized together with the necessary code reorder when
      multiply-add/multiply-subtract statements are met. Finally load/store
      bonding is activated by default. All of these optimizations may make
      the code relatively faster than if just MIP32 release 5 architecture
      was requested.
      Co-developed-by: NAlexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Signed-off-by: NAlexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      281e3aea
    • S
      mips: Add MIPS Release 5 support · ab7c01fd
      Serge Semin 提交于
      There are five MIPS32/64 architecture releases currently available:
      from 1 to 6 except fourth one, which was intentionally skipped.
      Three of them can be called as major: 1st, 2nd and 6th, that not only
      have some system level alterations, but also introduced significant
      core/ISA level updates. The rest of the MIPS architecture releases are
      minor.
      
      Even though they don't have as much ISA/system/core level changes
      as the major ones with respect to the previous releases, they still
      provide a set of updates (I'd say they were intended to be the
      intermediate releases before a major one) that might be useful for the
      kernel and user-level code, when activated by the kernel or compiler.
      In particular the following features were introduced or ended up being
      available at/after MIPS32/64 Release 5 architecture:
      + the last release of the misaligned memory access instructions,
      + virtualisation - VZ ASE - is optional component of the arch,
      + SIMD - MSA ASE - is optional component of the arch,
      + DSP ASE is optional component of the arch,
      + CP0.Status.FR=1 for CP1.FIR.F64=1 (pure 64-bit FPU general registers)
        must be available if FPU is implemented,
      + CP1.FIR.Has2008 support is required so CP1.FCSR.{ABS2008,NAN2008} bits
        are available.
      + UFR/UNFR aliases to access CP0.Status.FR from user-space by means of
        ctc1/cfc1 instructions (enabled by CP0.Config5.UFR),
      + CP0.COnfig5.LLB=1 and eretnc instruction are implemented to without
        accidentally clearing LL-bit when returning from an interrupt,
        exception, or error trap,
      + XPA feature together with extended versions of CPx registers is
        introduced, which needs to have mfhc0/mthc0 instructions available.
      
      So due to these changes GNU GCC provides an extended instructions set
      support for MIPS32/64 Release 5 by default like eretnc/mfhc0/mthc0. Even
      though the architecture alteration isn't that big, it still worth to be
      taken into account by the kernel software. Finally we can't deny that
      some optimization/limitations might be found in future and implemented
      on some level in kernel or compiler. In this case having even
      intermediate MIPS architecture releases support would be more than
      useful.
      
      So the most of the changes provided by this commit can be split into
      either compile- or runtime configs related. The compile-time related
      changes are caused by adding the new CONFIG_CPU_MIPS32_R5/CONFIG_CPU_MIPSR5
      configs and concern the code activating MIPSR2 or MIPSR6 already
      implemented features (like eretnc/LLbit, mthc0/mfhc0). In addition
      CPU_HAS_MSA can be now freely enabled for MIPS32/64 release 5 based
      platforms as this is done for CPU_MIPS32_R6 CPUs. The runtime changes
      concerns the features which are handled with respect to the MIPS ISA
      revision detected at run-time by means of CP0.Config.{AT,AR} bits. Alas
      these fields can be used to detect either r1 or r2 or r6 releases.
      But since we know which CPUs in fact support the R5 arch, we can manually
      set MIPS_CPU_ISA_M32R5/MIPS_CPU_ISA_M64R5 bit of c->isa_level and then
      use cpu_has_mips32r5/cpu_has_mips64r5 where it's appropriate.
      
      Since XPA/EVA provide too complex alterationss and to have them used with
      MIPS32 Release 2 charged kernels (for compatibility with current platform
      configs) they are left to be setup as a separate kernel configs.
      Co-developed-by: NAlexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Signed-off-by: NAlexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      ab7c01fd
  22. 17 5月, 2020 1 次提交
  23. 12 5月, 2020 1 次提交
  24. 10 5月, 2020 3 次提交