On Wed, Jul 31, 2019 at 10:48:38AM +0200, Linus Walleij wrote:
On Tue, Jul 30, 2019 at 3:41 PM Mark Brown broonie@kernel.org wrote:
Today's -next fails to boot on QDF2400 systems:
Is this a devicetree or ACPI system? Which devicetree in that case? If it is ACPI I assume one had to look into DSDTs?
You can see from the linked logs it's an ACPI system, the ACPI code announces it during boot.
Aha. I think this only worked out of chance before.
What the Qualcomm driver does is exploit that .init_valid_mask() gets called even if .need_valid_mask in gpio_chip is not set to true, and this is why the bug appears in msm_gpio_init_valid_mask(), I'm pretty much sure it is the bitmap_zero(chip->valid_mask, max_gpios); call towards the end of the function that gets turned into: 08:56:36.114798 [ 4.433713] __memset+0x80/0x188
And this causes the crash.
Should init_valid_mask() be being called if need_valid_mask() is false?
Apparently this only happens on ACPI systems because I tested it myself on a DT system.
Might also depend on the particular DT the system has?
So if OF and ACPI is activated at the same time (can that happen?)
Not really. There is a stub DT used to pass ACPI to the kernel.