Re: [PATCH 08/16] OMAP3: Populate scratchpad contents

Kevin Hilman
2008-10-29T23:35:42Z

Woodruff, Richard wrote:
>>> + arm_context_addr = io_v2p(omap3_arm_context);
>
>> strange is how the code is still working.
>
> Probably just corrupts some DDR a bit higher up.

Hmm, "just" corrupting memory? ;)

I assume memory is being corrupted, but it also given an address in the
virtual memory map of the kernel. How is the ROM code halding a virtual
address? Just ignoring the upper bits?

>> I believe what is intented is for arm_context_addr to be a physical
>> memory address, right? I've converted this to virt_to_phys().
>
> Yes virt_to_phys() should be here. Current 2.6.24 kernel's do it this way also.

Which begs the question why the patch sent to the list is using io_p2v()
introducing a bug which was only caught by accident because it also
introduced a compiler warning.

Kevin