Re: Re: [PATCH V3 3/5] misc/pvpanic: add MMIO support

From: Andy Shevchenko
Date: Tue Oct 30 2018 - 05:54:27 EST


On Tue, Oct 30, 2018 at 5:08 AM <peng.hao2@xxxxxxxxxx> wrote:
> >On Mon, Oct 29, 2018 at 12:54 PM <peng.hao2@xxxxxxxxxx> wrote:

> >I would consider it as a bug if on some architectures iounmap() is not
> >able to take a base got from ioport_map().

> I added TYPE_PVPANIC_MMIO in QEMU to the architecture that does not support IOPORT.
> If some architectures does not support IOPORT, set TYPE_PVPANIC_MMIO in qemu. This setting is reflected in the kernel pvpanic driver
> and does not invoke ioport_map (calling ioremap). So I think the situation you described above will not happen.

> But I should resume one check like this to deal with the failure of ioremap/ioport_map.
> if (base)
> iounmap(base)

I'm a bit confused, how come that base == NULL when you about to call
iounmap()? Where you would like to put this check?

> The patch of QEMU is still in review.

--
With Best Regards,
Andy Shevchenko