Skip to content

mips: ralink: mt7621: fix kzalloc too early

John Thomson linux-mips lkml 1 version Applied

Status from this message: applied to mips-next.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3mips: ralink: mt7621: define MT7621_SYSC_BASE with __iomemarch/mips/include/asm/mach-ralink/mt7621.h arch/mips/ralink/mt7621.c+6 -51 reply
2/3mips: ralink: mt7621: soc queries and tests as functionsarch/mips/ralink/mt7621.c+61 -251 reply
3/3mips: ralink: mt7621: do not use kzalloc too earlyarch/mips/ralink/mt7621.c+9 -51 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] mips: ralink: mt7621: fix kzalloc too early

ralink mt7621 attempts to use kzalloc before normal memory management is available.
Before v6.1-rc1, mt7621.c soc_dev_init silently failed to kzalloc and returned immediately afterwards, continuing to boot without the SOC_BUS device registered.
After, (with CONFIG_SLUB) kernel crashes before it outputs any console messages

This was bisected to an mm/slub change (detailed in patch 3)

This change exposed oops in the quirks tables in the mt7621 phy-pci & pci-controller drivers. The phy-pci quirk fix got into -rc5, but the pci-controller quirk fix has not been picked up yet.
https://lore.kernel.org/lkml/[email protected]/T/#u
This is mentioned in patch 3 as:
not yet applied ("PCI: mt7621: add sentinel to quirks table")

Changes from RFC
https://lore.kernel.org/lkml/[email protected]/T/#u
to v1:

1/3:
cut the CPHYSADDR to match the line moved to the header file 2/3:
No useless const unsigned {int,bool} function declarations (thanks kernel test robot)
3/3:
static struct *soc_info_ptr
Mention fixed phy-pci & (unapplied) pci-controller quirks sentinels Add fixes tag

Cheers,
John