linux_dsm_epyc7002/arch/mips
NeilBrown a63d706ea7
MIPS: ralink: Fix booting on MT7621
Since commit 3af5a67c86 ("MIPS: Fix early CM probing") the MT7621 has
not been able to boot.

This commit caused mips_cm_probe() to be called before
mt7621.c::proc_soc_init().

prom_soc_init() has a comment explaining that mips_cm_probe() "wipes out
the bootloader config" and means that configuration registers are no
longer available. It has some code to re-enable this config.

Before this re-enable code is run, the sysc register cannot be read, so
when SYSC_REG_CHIP_NAME0 is read, a garbage value is returned and
panic() is called.

If we move the config-repair code to the top of prom_soc_init(), the
registers can be read and boot can proceed.

Very occasionally, the first register read after the reconfiguration
returns garbage, so add a call to __sync().

Fixes: 3af5a67c86 ("MIPS: Fix early CM probing")
Signed-off-by: NeilBrown <neil@brown.name>
Reviewed-by: Matt Redfearn <matt.redfearn@mips.com>
Cc: John Crispin <john@phrozen.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.5+
Patchwork: https://patchwork.linux-mips.org/patch/18859/
Signed-off-by: James Hogan <jhogan@kernel.org>
2018-03-22 00:06:30 +00:00
..
alchemy
ar7
ath25 MIPS: ath25: Check for kzalloc allocation failure 2018-02-23 09:35:54 +00:00
ath79
bcm47xx
bcm63xx MIPS: BCM63XX: kconfig: Remove blank help text 2018-02-02 23:53:10 +09:00
bmips
boot MIPS: boot: Define __ASSEMBLY__ for its.S build 2018-02-22 17:06:25 -08:00
cavium-octeon MIPS: OCTEON: irq: Check for null return on kzalloc allocation 2018-02-23 09:44:46 +00:00
cobalt
configs MIPS changes for 4.16 2018-02-07 11:22:44 -08:00
dec
emma
fw
generic MIPS: Generic: Support GIC in EIC mode 2018-02-05 14:36:03 +00:00
include MIPS: Drop spurious __unused in struct compat_flock 2018-02-20 15:46:44 +00:00
jazz
jz4740
kernel MIPS: BMIPS: Do not mask IPIs during suspend 2018-03-05 23:35:04 +00:00
kvm
lantiq MIPS: lantiq: ase: Enable MFD_SYSCON 2018-03-21 21:57:35 +00:00
lasat
lib
loongson32
loongson64 MIPS: Loongson64: Select ARCH_MIGHT_HAVE_PC_SERIO 2018-03-05 09:59:31 +00:00
math-emu
mm MIPS changes for 4.16 2018-02-07 11:22:44 -08:00
mti-malta
net
netlogic
oprofile
paravirt
pci
pic32
pistachio
pmcs-msp71xx
pnx833x
power
ralink MIPS: ralink: Fix booting on MT7621 2018-03-22 00:06:30 +00:00
rb532
sgi-ip22
sgi-ip27
sgi-ip32
sibyte
sni
tools
txx9 MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS 2018-02-05 13:32:17 +00:00
vdso
vr41xx
Kbuild
Kbuild.platforms
Kconfig Kbuild updates for v4.16 (2nd) 2018-02-09 19:32:41 -08:00
Kconfig.debug
Makefile
Makefile.postlink