[PATCH 2/8] mtd: cfi_flash: allow 0x0 mapping

Rouven Czerwinski r.czerwinski at pengutronix.de
Tue Nov 10 01:33:53 EST 2020


On Mon, 2020-11-09 at 14:52 +0100, Lucas Stach wrote:
> Am Montag, den 09.11.2020, 14:44 +0100 schrieb Rouven Czerwinski:
> > Annotate the different read and write functions with
> > zero_page_{access/faulting}. This allows the cfi_flash driver to be used
> > on the QEMU virt machine with an enabled MMU.
> 
> I don't like this zero-page access allow in a driver at all. If you
> have some free address space somewhere, you could also solve this issue
> by remapping the IO resource to somewhere else in the address space,
> deviating from the 1:1 mapping. The Tegra PCIe host driver does this,
> if you need some inspiration.

I totally agree, remapping the IO region sounds like a much better
choice.

Regards,
Rouven





More information about the barebox mailing list