An error occurred fetching the project authors.
  1. 09 Nov, 2021 2 commits
    • Florian Fainelli's avatar
      MIPS: BMIPS: Enable PCI Kconfig · 1d987052
      Florian Fainelli authored
      Enable HAVE_PCI and PCI_DRIVERS_GENERIC so we can build PCIE_BRCMSTB
      which is the PCIe host bridge driver for this platform.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      1d987052
    • Randy Dunlap's avatar
      mips: BCM63XX: ensure that CPU_SUPPORTS_32BIT_KERNEL is set · 5eeaafc8
      Randy Dunlap authored
      Several header files need info on CONFIG_32BIT or CONFIG_64BIT,
      but kconfig symbol BCM63XX does not provide that info. This leads
      to many build errors, e.g.:
      
         arch/mips/include/asm/page.h:196:13: error: use of undeclared identifier 'CAC_BASE'
                 return x - PAGE_OFFSET + PHYS_OFFSET;
         arch/mips/include/asm/mach-generic/spaces.h:91:23: note: expanded from macro 'PAGE_OFFSET'
         #define PAGE_OFFSET             (CAC_BASE + PHYS_OFFSET)
         arch/mips/include/asm/io.h:134:28: error: use of undeclared identifier 'CAC_BASE'
                 return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
         arch/mips/include/asm/mach-generic/spaces.h:91:23: note: expanded from macro 'PAGE_OFFSET'
         #define PAGE_OFFSET             (CAC_BASE + PHYS_OFFSET)
      
      arch/mips/include/asm/uaccess.h:82:10: error: use of undeclared identifier '__UA_LIMIT'
                 return (__UA_LIMIT & (addr | (addr + size) | __ua_size(size))) == 0;
      
      Selecting the SYS_HAS_CPU_BMIPS* symbols causes SYS_HAS_CPU_BMIPS to be
      set, which then selects CPU_SUPPORT_32BIT_KERNEL, which causes
      CONFIG_32BIT to be set. (a bit more indirect than v1 [RFC].)
      
      Fixes: e7300d04 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: linux-mips@vger.kernel.org
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Maxime Bizon <mbizon@freebox.fr>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Suggested-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      5eeaafc8
  2. 25 Oct, 2021 1 commit
    • Mark Rutland's avatar
      irq: mips: stop (ab)using handle_domain_irq() · bab4ff1e
      Mark Rutland authored
      On MIPS, the only user of handle_domain_irq() is octeon_irq_ciu3_ip2(),
      which is called from the platform-specific plat_irq_dispatch() function
      invoked from the early assembly code.
      
      No other irqchip relevant to arch/mips uses handle_domain_irq():
      
      * No other plat_irq_dispatch() function transitively calls
        handle_domain_irq().
      
      * No other vectored IRQ dispatch function registered with
        set_vi_handler() calls handle_domain_irq().
      
      * No chained irqchip handlers call handle_domain_irq(), which makes
        sense as this is meant to only be used by root irqchip handlers.
      
      Currently octeon_irq_ciu3_ip2() passes NULL as the `regs` argument to
      handle_domain_irq(), and as handle_domain_irq() will pass this to
      set_irq_regs(), any invoked IRQ handlers will erroneously see a NULL
      pt_regs if they call get_pt_regs().
      
      Fix this by calling generic_handle_domain_irq() directly, and performing
      the necessary irq_{enter,exit}() logic directly in
      octeon_irq_ciu3_ip2(). At the same time, deselect HANDLE_DOMAIN_IRQ,
      which subsequent patches will remove.
      
      Other than the corrected behaviour of get_pt_regs(), there should be no
      functional change as a result of this patch.
      
      Fixes: ce210d35 ("MIPS: OCTEON: Add support for OCTEON III interrupt controller.")
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
      Acked-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      bab4ff1e
  3. 24 Oct, 2021 1 commit
  4. 20 Oct, 2021 1 commit
  5. 11 Oct, 2021 1 commit
  6. 07 Oct, 2021 1 commit
  7. 06 Oct, 2021 1 commit
  8. 23 Sep, 2021 1 commit
    • Jackie Liu's avatar
      MIPS: loongson64: make CPU_LOONGSON64 depends on MIPS_FP_SUPPORT · 7f3b3c2b
      Jackie Liu authored
      mach/loongson64 fails to build when the FPU support is disabled:
      
      arch/mips/loongson64/cop2-ex.c:45:15: error: implicit declaration of function ‘__is_fpu_owner’; did you mean ‘is_fpu_owner’? [-Werror=implicit-function-declaration]
      arch/mips/loongson64/cop2-ex.c:98:30: error: ‘struct thread_struct’ has no member named ‘fpu’
      arch/mips/loongson64/cop2-ex.c:99:30: error: ‘struct thread_struct’ has no member named ‘fpu’
      arch/mips/loongson64/cop2-ex.c:131:43: error: ‘struct thread_struct’ has no member named ‘fpu’
      arch/mips/loongson64/cop2-ex.c:137:38: error: ‘struct thread_struct’ has no member named ‘fpu’
      arch/mips/loongson64/cop2-ex.c:203:30: error: ‘struct thread_struct’ has no member named ‘fpu’
      arch/mips/loongson64/cop2-ex.c:219:30: error: ‘struct thread_struct’ has no member named ‘fpu’
      arch/mips/loongson64/cop2-ex.c:283:38: error: ‘struct thread_struct’ has no member named ‘fpu’
      arch/mips/loongson64/cop2-ex.c:301:38: error: ‘struct thread_struct’ has no member named ‘fpu’
      
      Fixes: ef2f826c ("MIPS: Loongson-3: Enable the COP2 usage")
      Suggested-by: default avatarHuacai Chen <chenhuacai@kernel.org>
      Reviewed-by: default avatarHuacai Chen <chenhuacai@kernel.org>
      Reported-by: default avatark2ci robot <kernel-bot@kylinos.cn>
      Signed-off-by: default avatarJackie Liu <liuyun01@kylinos.cn>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      7f3b3c2b
  9. 16 Aug, 2021 1 commit
  10. 12 Aug, 2021 1 commit
  11. 30 Jul, 2021 2 commits
  12. 01 Jul, 2021 2 commits
  13. 29 Jun, 2021 1 commit
  14. 08 Jun, 2021 4 commits
    • Arnd Bergmann's avatar
      clkdev: remove CONFIG_CLKDEV_LOOKUP · 2f4574dd
      Arnd Bergmann authored
      This option is now synonymous with CONFIG_HAVE_CLK, so use
      the latter globally. Any out-of-tree platform ports that
      still use a private clk_get()/clk_put() implementation should
      move to CONFIG_COMMON_CLK.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      2f4574dd
    • Arnd Bergmann's avatar
      mips: ralink: convert to CONFIG_COMMON_CLK · 35f752be
      Arnd Bergmann authored
      ralink only has a very trivial clock implementation, with everything
      being fixed clocks.
      
      Convert it to CONFIG_COMMON_CLK to reduce the number of platforms
      that rely on legacy clocks. Of course, the clocks really should
      be read from the device tree instead, but this is a step into that
      direction.
      
      This adds about 50KB to the kernel image size, which is an unfortunate
      increase, but not as bad as I had feared:
      
         text	   data	    bss	    dec	    hex	filename
      3778560	1582216	  92256	5453032	 5334e8	vmlinux-vocore-before
      3822148	1601192	  92304	5515644	 54297c	vmlinux-vocore-after
      3870226	1644468	 200192	5714886	 5733c6	vmlinux-rt305x-before
      3916727	1668404	 200240	5785371	 58471b	vmlinux-rt305x-after
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      35f752be
    • Arnd Bergmann's avatar
      mips: ar7: convert to CONFIG_COMMON_CLK · b408b611
      Arnd Bergmann authored
      Perform a minimal conversion of the ar7 clock implementation to the common
      clock framework. While the hardware can control the rates, this is left
      unchanged, and all clocks are registered as fixed-rate or fixed-divider
      clocks. Similarly, the clkdev lookup information is left unchanged but
      moved from the table format into individual allocations.
      
      There is a small increase in code size:
      
         text	   data	    bss	    dec	    hex	filename
      4757116	 596640	  91328	5445084	 5315dc	vmlinux-before
      4806159	 602360	  91344	5499863	 53ebd7	vmlinux-after
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      b408b611
    • Arnd Bergmann's avatar
      mips: ar7: convert to clkdev_lookup · 4410c423
      Arnd Bergmann authored
      ar7 is one of only two platforms that provide the clock interface but
      implement a custom version of the clkdev_lookup code.
      
      Change this to use the generic version instead.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      4410c423
  15. 01 Jun, 2021 2 commits
  16. 26 May, 2021 2 commits
  17. 11 May, 2021 1 commit
    • Mike Rapoport's avatar
      MIPS: Octeon: drop dependency on CONFIG_HOLES_IN_ZONE · cf5b6a94
      Mike Rapoport authored
      CAVIUM_OCTEON_SOC configuration selects HOLES_IN_ZONE option to cope with
      memory crashes that were happening in 2011.
      
      This option effectively aliases pfn_valid_within() to pfn_valid() when
      enabled and hardwires it to 1 when disabled. The check for
      pfn_valid_within() is only relevant in case the memory map may have holes
      or undefined struct page instances inside MAX_ORDER chunks.
      
      Since 2011 memory management initialization in general and memory map
      initialization particularly became much more robust so the check for
      pfn_valid_within() is not required on Octeon even despite its, hmm, unusual
      memory setup.
      
      Remove the selection of HOLES_IN_ZONE by CAVIUM_OCTEON_SOC and drop the
      HOLES_IN_ZONE configuration option entirely as Octeon was the only MIPS
      platform to use it.
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      cf5b6a94
  18. 05 May, 2021 1 commit
    • Anshuman Khandual's avatar
      mm: generalize SYS_SUPPORTS_HUGETLBFS (rename as ARCH_SUPPORTS_HUGETLBFS) · 855f9a8e
      Anshuman Khandual authored
      SYS_SUPPORTS_HUGETLBFS config has duplicate definitions on platforms
      that subscribe it.  Instead, just make it a generic option which can be
      selected on applicable platforms.
      
      Also rename it as ARCH_SUPPORTS_HUGETLBFS instead.  This reduces code
      duplication and makes it cleaner.
      
      Link: https://lkml.kernel.org/r/1617259448-22529-3-git-send-email-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Acked-by: Catalin Marinas <catalin.marinas@arm.com>	[arm64]
      Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>	[riscv]
      Acked-by: Michael Ellerman <mpe@ellerman.id.au>		[powerpc]
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Will Deacon <will@kernel.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      855f9a8e
  19. 30 Apr, 2021 1 commit
  20. 23 Apr, 2021 1 commit
  21. 06 Apr, 2021 2 commits
  22. 29 Mar, 2021 2 commits
    • Julian Braha's avatar
      arch: mips: fix unmet dependency for MTD_COMPLEX_MAPPINGS · f766b28a
      Julian Braha authored
      When CAVIUM_OCTEON_SOC is enabled, and MTD is disabled,
      Kbuild gives the following warning:
      
      WARNING: unmet direct dependencies detected for MTD_COMPLEX_MAPPINGS
        Depends on [n]: MTD [=n] && HAS_IOMEM [=y]
        Selected by [y]:
        - CAVIUM_OCTEON_SOC [=y] && <choice>
      
      This is because CAVIUM_OCTEON_SOC selects MTD_COMPLEX_MAPPINGS,
      without selecting or depending on MTD, despite MTD_COMPLEX_MAPPINGS
      depending on MTD.
      Signed-off-by: default avatarJulian Braha <julianbraha@gmail.com>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      f766b28a
    • Tiezhu Yang's avatar
      MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again · 66633abd
      Tiezhu Yang authored
      After commit 0ebeea8c ("bpf: Restrict bpf_probe_read{, str}() only to
      archs where they work"), bpf_probe_read{, str}() functions were no longer
      available on MIPS, so there exist some errors when running bpf program:
      
      root@linux:/home/loongson/bcc# python examples/tracing/task_switch.py
      bpf: Failed to load program: Invalid argument
      [...]
      11: (85) call bpf_probe_read#4
      unknown func bpf_probe_read#4
      [...]
      Exception: Failed to load BPF program count_sched: Invalid argument
      
      ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE should be restricted to archs
      with non-overlapping address ranges, but they can overlap in EVA mode
      on MIPS, so select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA in
      arch/mips/Kconfig, otherwise the bpf old helper bpf_probe_read() will
      not be available.
      
      This is similar with the commit d195b1d1 ("powerpc/bpf: Enable
      bpf_probe_read{, str}() on powerpc again").
      
      Fixes: 0ebeea8c ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work")
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      66633abd
  23. 14 Mar, 2021 1 commit
    • Huang Pei's avatar
      MIPS: clean up CONFIG_MIPS_PGD_C0_CONTEXT handling · c6972fb9
      Huang Pei authored
      +. LOONGSON64 use 0x98xx_xxxx_xxxx_xxxx as xphys cached, instread of
      0xa8xx_xxxx_xxxx_xxxx
      
      +. let CONFIG_MIPS_PGD_C0_CONTEXT depend on 64bit
      
      +. cast CAC_BASE into u64 to silence warning on MIPS32
      
      CP0 Context has enough room for wraping pgd into its 41-bit PTEBase field.
      
      +. For XPHYS, the trick is that pgd is 4kB aligned, and the PABITS <= 53,
      only save 53 - 12 = 41 bits, aka :
      
         bit[63:59] | 0000 00 |  bit[53:12] | 0000 0000 0000
      
      +. for CKSEG0, only save 29 - 12 = 17 bits
      
      when switching pgd, only need to save bit[53:12] or bit[28:12] into
      CP0 Context's bit[63:23], see folling asm generated at run time
      
      tlbmiss_handler_setup_pgd:
      	.set	push
      	.set	noreorder
      
      	dsra	a2, a0, 29
      	move	a3, a0
      	dins	a0, zero, 29, 35
      	daddiu	a2, a2, 4	//for CKSEG0, a2 from 0xfffffffffffffffc
      				//into 0
      
      	movn	a0, a3, a2
      	dsll	a0, a0, 11
      	jr	ra
      	dmtc0	a0, CP0_CONTEXT
      
      	.set	pop
      
      when using it on page walking
      
      	dmfc0	k0, CP0_CONTEXT
      	dins	k0, zero, 0, 23	         // zero badv2
      	ori	k0, k0, (CAC_BASE >> 53) // *prefix* with bit[63:59]
      	drotr	k0, k0, 11		 // kick it in the right place
      Signed-off-by: default avatarHuang Pei <huangpei@loongson.cn>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      c6972fb9
  24. 10 Mar, 2021 1 commit
  25. 06 Mar, 2021 3 commits
  26. 13 Feb, 2021 3 commits