Messages in this thread | | | From | Andy Shevchenko <> | Date | Mon, 5 Nov 2018 14:55:03 +0200 | Subject | Re: [PATCH V7 3/9] misc/pvpanic: add MMIO support |
| |
On Mon, Nov 5, 2018 at 4:31 AM Peng Hao <peng.hao2@zte.com.cn> wrote: > > On some architectures (e.g. arm64), it's preferable to use MMIO, since > this can be used standalone. Add MMIO support to the pvpanic driver.
Thanks for an update, looks quite good, though couple of comments below.
> if (acpi_dev_resource_io(res, &r)) { > - port = r.start;
> + base = (void __iomem *) ioport_map(r.start, > + r.end - r.start + 1);
I'm so sorry I didn't notice this stuff.
1. ioport_map() already returns void __iomem *. No need to cast. 2. To calculate resource size we have a helper macro resource_size().
> + return AE_OK; > + } else if (acpi_dev_resource_memory(res, &r)) { > + base = ioremap(r.start, r.end - r.start + 1);
Ditto for the size calculation.
> return AE_OK;
-- With Best Regards, Andy Shevchenko
| |