1. 16 4月, 2021 2 次提交
    • I
      MIPS: pci-rt2880: fix slot 0 configuration · 8e98b697
      Ilya Lipnitskiy 提交于
      pci_fixup_irqs() used to call pcibios_map_irq on every PCI device, which
      for RT2880 included bus 0 slot 0. After pci_fixup_irqs() got removed,
      only slots/funcs with devices attached would be called. While arguably
      the right thing, that left no chance for this driver to ever initialize
      slot 0, effectively bricking PCI and USB on RT2880 devices such as the
      Belkin F5D8235-4 v1.
      
      Slot 0 configuration needs to happen after PCI bus enumeration, but
      before any device at slot 0x11 (func 0 or 1) is talked to. That was
      determined empirically by testing on a Belkin F5D8235-4 v1 device. A
      minimal BAR 0 config write followed by read, then setting slot 0
      PCI_COMMAND to MASTER | IO | MEMORY is all that seems to be required for
      proper functionality.
      
      Tested by ensuring that full- and high-speed USB devices get enumerated
      on the Belkin F5D8235-4 v1 (with an out of tree DTS file from OpenWrt).
      
      Fixes: 04c81c72 ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
      Signed-off-by: NIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Tobias Wolf <dev-NTEO@vplace.de>
      Cc: <stable@vger.kernel.org> # v4.14+
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      8e98b697
    • T
      MIPS: Fix strnlen_user access check · 2c92ef8f
      Thomas Bogendoerfer 提交于
      Commit 04324f44 ("MIPS: Remove get_fs/set_fs") changed the access_ok
      for strnlen_user to check the whole range, which broke some callers
      of strndup_user(). Restore the old behaviour and just check the first byte.
      
      Fixes: 04324f44 ("MIPS: Remove get_fs/set_fs")
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      2c92ef8f
  2. 13 4月, 2021 1 次提交
  3. 12 4月, 2021 4 次提交
  4. 09 4月, 2021 1 次提交
  5. 07 4月, 2021 1 次提交
  6. 06 4月, 2021 13 次提交
  7. 30 3月, 2021 1 次提交
  8. 29 3月, 2021 7 次提交
    • Q
      MIPS: Loongson64: enable CONFIG_USB_SERIAL_PL2303 · 19f0e8cd
      Qing Zhang 提交于
      When using the Loongson-3A4000 machine for serial port debugging,
      there is no /dev/ttyUSB* output, which makes the serial port unavailable,
      For convenience, we open this configuration.
      
      zhangqing@loongson-pc:~$ cat /sys/firmware/lefi/boardinfo
      Board Info
      Manufacturer		: THTF
      Board Name		: THTF-LS3A4000-7A1000-ML4A
      Family			: LOONGSON3
      
      BIOS Info
      Vendor			: ZD tech
      Version			: ZD tech-V2.1.1
      ROM Size		: 4 KB
      Release Date		: 2020-06-29
      
      zhangqing@loongson-pc:~$ lsusb
      Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 005 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
      Bus 005 Device 002: ID 0c45:760b Microdia USB Keyboard
      Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 003 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
      Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Signed-off-by: NQing Zhang <zhangqing@loongson.cn>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      19f0e8cd
    • I
      crypto: mips: add poly1305-core.S to .gitignore · dc92d0df
      Ilya Lipnitskiy 提交于
      poly1305-core.S is an auto-generated file, so it should be ignored.
      
      Fixes: a11d055e ("crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation")
      Signed-off-by: NIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
      Cc: Ard Biesheuvel <ardb@kernel.org>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      dc92d0df
    • C
      MIPS: ralink: mt7621: add memory detection support · 139c949f
      Chuanhong Guo 提交于
      mt7621 has the following memory map:
      0x0-0x1c000000: lower 448m memory
      0x1c000000-0x2000000: peripheral registers
      0x20000000-0x2400000: higher 64m memory
      
      detect_memory_region in arch/mips/kernel/setup.c only adds the first
      memory region and isn't suitable for 512m memory detection because
      it may accidentally read the memory area for peripheral registers.
      
      This commit adds memory detection capability for mt7621:
        1. Add the highmem area when 512m is detected.
        2. Guard memcmp from accessing peripheral registers:
           This only happens when a user decided to change kernel load address
           to 256m or higher address. Since this is a quite unusual case, we
           just skip 512m testing and return 256m as memory size.
      Signed-off-by: NChuanhong Guo <gch981213@gmail.com>
      [Minor commit message reword, make mt7621_memory_detect static]
      Signed-off-by: NIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      139c949f
    • I
      MIPS: ralink: annotate prom_soc_init() with __init · 8eb6eb48
      Ilya Lipnitskiy 提交于
      prom_soc_init is only called from prom_init in arch/mips/ralink/prom.c,
      which is already annotated with __init, so annotate prom_soc_init with
      __init too.
      Signed-off-by: NIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      8eb6eb48
    • J
      arch: mips: fix unmet dependency for MTD_COMPLEX_MAPPINGS · f766b28a
      Julian Braha 提交于
      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: NJulian Braha <julianbraha@gmail.com>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      f766b28a
    • J
      arch: mips: fix unmet dependency for DEBUG_INFO · e87f69a5
      Julian Braha 提交于
      When SB1XXX_CORELIS is enabled, COMPILE_TEST is disabled,
      and DEBUG_KERNEL is disabled, Kbuild gives the
      following warning:
      
      WARNING: unmet direct dependencies detected for DEBUG_INFO
        Depends on [n]: DEBUG_KERNEL [=n] && !COMPILE_TEST [=n]
        Selected by [y]:
        - SB1XXX_CORELIS [=y] && SIBYTE_SB1xxx_SOC [=y] && !COMPILE_TEST [=n]
      
      This is because SB1XXX_CORELIS selects DEBUG_INFO without
      selecting or depending on DEBUG_KERNEL, despite DEBUG_INFO
      depending on DEBUG_KERNEL.
      Signed-off-by: NJulian Braha <julianbraha@gmail.com>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      e87f69a5
    • T
      MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again · 66633abd
      Tiezhu Yang 提交于
      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: NTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
      66633abd
  9. 25 3月, 2021 9 次提交
  10. 24 3月, 2021 1 次提交