Re: [PATCH] x86, mm: fix boot hang regression

From: Yinghai Lu
Date: Sat May 25 2013 - 03:31:47 EST


On Fri, May 24, 2013 at 9:30 PM, Yuanhan Liu
<yuanhan.liu@xxxxxxxxxxxxxxx> wrote:
> Commit 8d57470d introduced a kernel panic while setting mem=2G at
> boot time, and commit c9b3234a6 turns the the kernel panic to hang.
>
> While, the reason is the same: the are accessing a BAD address; I mean
> the mapping is broken.
>
> Here is a mem mapping range dumped at boot time:
> [mem 0x00000000-0x000fffff] page 4k (0)
> [mem 0x7fe00000-0x7fffffff] page 1G (1)
> [mem 0x7c000000-0x7fdfffff] page 1G (2)
> [mem 0x00100000-0x001fffff] page 4k (3)
> [mem 0x00200000-0x7bffffff] page 2M (4)
>
...
> I reported this panic regression long time ago, and I didn't notic the above
> panic->hang change before, which might confuse Yinghai for understanding
> what happened from 2 logs I sent before(one is from 8d57470d, another is
> from the HEAD commit at that time, which turn to a hang as stated).
> More, it seems that Yinghai can't produce it. And I was busying at
> something else. And I finally got a day yesterday(and a good mood ;).
>
> Last, Thanks Changlong's effort for bisecting the 2 above commit.
> ---
> arch/x86/mm/init_64.c | 51 +++++++++++++++++++++++++++++++++++++++++-------
> 1 files changed, 43 insertions(+), 8 deletions(-)

oh, I know the reason, my intel box has acpi or reserved area just below 2GiB.

your patch is not right fix.

Attached patch should fix the problem.

Thanks

Yinghai

Attachment: fix_adjust_page_mask_with_1g.patch
Description: Binary data