Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)
From: Nicolas Pitre
Date: Mon Nov 27 2017 - 15:31:58 EST
On Mon, 27 Nov 2017, Tejun Heo wrote:
> Hello,
>
> I'm reverting the offending commit till we figure out what's going on.
It is figured out. The cris port is wrongly initializing the bootmem
allocator with virtual memory addresses rather than physical addresses.
And because its __va() definition reads like this:
#define __va(x) ((void *)((unsigned long)(x) | 0x80000000))
then things just work out because the end result is the same whether you
give this a physical or a virtual address.
Untill you call memblock_free_early(__pa(address)) that is, because
values from __pa() don't match with the virtual addresses stuffed in the
bootmem allocator anymore.
So IMHO I don't think reverting the commit is the right thing to do.
That commit is clearly not at fault here.
Nicolas