2017-11-27 20:32:46

by Nicolas Pitre

[permalink] [raw]
Subject: Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

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

From 1585249484639764605@xxx Mon Nov 27 19:41:58 +0000 2017
X-GM-THRID: 1584466607656225114
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread