android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maciej W. Rozycki 1c74ded6a1 MIPS: Malta: Fix !EVA SOC-it PCI MMIO
commit ebd729fef31620e0bf74cbf8a4c7fda73a2a4e7e upstream.

Fix a regression that has caused accesses to the PCI MMIO window to
complete unclaimed in non-EVA configurations with the SOC-it family of
system controllers, preventing PCI devices from working that use MMIO.

In the non-EVA case PHYS_OFFSET is set to 0, meaning that PCI_BAR0 is
set with an empty mask (and PCI_HEAD4 matches addresses starting from 0
accordingly).  Consequently all addresses are matched for incoming DMA
accesses from PCI.  This seems to confuse the system controller's logic
and outgoing bus cycles targeting the PCI MMIO window seem not to make
it to the intended devices.

This happens as well when a wider mask is used with PCI_BAR0, such as
0x80000000 or 0xe0000000, that makes addresses match that overlap with
the PCI MMIO window, which starts at 0x10000000 in our configuration.

Set the mask in PCI_BAR0 to 0xf0000000 for non-EVA then, covering the
non-EVA maximum 256 MiB of RAM, which is what YAMON does and which used
to work correctly up to the offending commit.  Set PCI_P2SCMSKL to match
PCI_BAR0 as required by the system controller's specification, and match
PCI_P2SCMAPL to PCI_HEAD4 for identity mapping.

Verified with:

Core board type/revision =      0x0d (Core74K) / 0x01
System controller/revision =    MIPS SOC-it 101 OCP / 1.3   SDR-FW-4:1
Processor Company ID/options =  0x01 (MIPS Technologies, Inc.) / 0x1c
Processor ID/revision =         0x97 (MIPS 74Kf) / 0x4c

for non-EVA and with:

Core board type/revision =      0x0c (CoreFPGA-5) / 0x00
System controller/revision =    MIPS ROC-it2 / 0.0   FW-1:1 (CLK_unknown) GIC
Processor Company ID/options =  0x01 (MIPS Technologies, Inc.) / 0x00
Processor ID/revision =         0xa0 (MIPS interAptiv UP) / 0x20

for EVA/non-EVA, fixing:

defxx 0000:00:12.0: assign IRQ: got 10
defxx: v1.12 2021/03/10  Lawrence V. Stefani and others
0000:00:12.0: Could not read adapter factory MAC address!

vs:

defxx 0000:00:12.0: assign IRQ: got 10
defxx: v1.12 2021/03/10  Lawrence V. Stefani and others
0000:00:12.0: DEFPA at MMIO addr = 0x10142000, IRQ = 10, Hardware addr = 00-00-f8-xx-xx-xx
0000:00:12.0: registered as fddi0

for non-EVA and causing no change for EVA.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Fixes: 422dd25664 ("MIPS: Malta: Allow PCI devices DMA to lower 2GB physical")
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-12-03 12:45:20 +01:00
..
alpha alpha: replace hardcoded stack offsets with autogenerated ones 2025-03-13 12:43:18 +01:00
arc arc: Fix __fls() const-foldability via __builtin_clzl() 2025-12-03 12:45:07 +01:00
arm ARM: 9448/1: Use an absolute path to unified.h in KBUILD_AFLAGS 2025-08-28 16:21:32 +02:00
arm64 arm64: errata: Apply workarounds for Neoverse-V3AE 2025-10-29 14:00:00 +01:00
c6x
csky csky, hexagon: fix broken sys_sync_file_range 2024-07-05 09:08:31 +02:00
h8300
hexagon hexagon: Fix unbalanced spinlock in die() 2025-03-13 12:43:01 +01:00
ia64 arch, mm: remove stale mentions of DISCONIGMEM 2024-02-23 08:25:13 +01:00
m68k m68k: bitops: Fix find_*_bit() signatures 2025-10-29 13:59:58 +01:00
microblaze microblaze: don't treat zero reserved memory regions as error 2024-11-08 16:20:25 +01:00
mips MIPS: Malta: Fix !EVA SOC-it PCI MMIO 2025-12-03 12:45:20 +01:00
nds32 arch, mm: remove stale mentions of DISCONIGMEM 2024-02-23 08:25:13 +01:00
nios2 nios2: force update_mmu_cache on spurious tlb-permission--related pagefaults 2025-06-27 11:02:54 +01:00
openrisc openrisc: Call setup_memory() earlier in the init sequence 2024-09-04 13:14:57 +02:00
parisc parisc: don't reference obsolete termio struct for TC* constants 2025-10-29 13:59:53 +01:00
powerpc powerpc/eeh: Use result of error_detected() in uevent 2025-12-03 12:45:09 +01:00
riscv riscv: Avoid fortify warning in syscall_get_arguments() 2025-05-02 07:39:20 +02:00
s390 s390/hypfs: Enable limited access during lockdown 2025-08-28 16:21:37 +02:00
sh sh: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2024-12-14 19:44:37 +01:00
sparc sparc/module: Add R_SPARC_UA64 relocation handling 2025-12-03 12:45:13 +01:00
um um: ubd: Add missing error check in start_io_thread() 2025-07-17 18:24:53 +02:00
unicore32
x86 x86/vsyscall: Do not require X86_PF_INSTR to emulate vsyscall 2025-12-03 12:45:09 +01:00
xtensa arch, mm: remove stale mentions of DISCONIGMEM 2024-02-23 08:25:13 +01:00
.gitignore
Kconfig