On 18.03.2025 14:11, Andrew Cooper wrote:
> On 18/03/2025 9:19 am, Roger Pau Monne wrote:
>> The call to ioremap_wc() in video_init() will always fail, because
>> video_init() is called ahead of vm_init_type(), and so the underlying
>> __vmap() call will fail to allocate the linear address space.
>>
>> Fix by reverting to the previous behavior and using ioremap() for the VGA
>> text buffer.
>>
>> Fixes: 81d195c6c0e2 ('x86: introduce ioremap_wc()')
>> Signed-off-by: Roger Pau Monné <roger....@citrix.com>
> 
> This is somewhat ugly.
> 
> ioremap() isn't really any better than ioremap_wc(); this only works
> because plain ioremap() has a special case for the bottom 1M where it
> does nothing and exits.

And this is exactly why I screwed up back then. Imo we would be better
off moving to using __va() directly here. Otherwise the same mistake
could be made again by someone (perhaps even me) noticing the less
efficient ioremap(), when ioremap_wc() really would be wanted.

Jan


Reply via email to