Subject: Re: [PATCH] kdump: don't call __ioremap() for pfn = 0

From: "Sachin P. Sant" <[email-masked]>
Date: Fri, 22 Sep 2006 09:52:06 +0530

Michael Ellerman wrote:
>> Attached is a patch to fix this problem. During such rare cases don't call
>> __ioremap() to do the address translation, instead use __va() .
>>     
>
> It's not really rare, it's just when we're reading /dev/oldmem directly.
>   
That's true. Since we don't try to copy raw dump from /dev/oldmem very
often, we haven't come across this problem. Hence rare .. but as
michael said always recreatable while using dd command with /dev/oldmem.

> We can actually use the __va() trick for the whole linear mapping rather
> than just pfn 0, which saves the ioremap. We also shouldn't really be
> trying to iounmap(__va(0)).
>   
Yes. Makes sense. Agreed.

> So perhaps something more like this? Although it's a bit ugly because of
> the need to conditionally call iounmap().
>   
< snip > 

Thanks
-Sachin