Messages in this thread | | | From | Andy Shevchenko <> | Date | Thu, 1 Nov 2018 19:04:00 +0200 | Subject | Re: [PATCH V5 6/8] misc/pvpanic: add MMIO support |
| |
On Thu, Nov 1, 2018 at 9:00 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.
> - if (acpi_dev_resource_io(res, &r) { > - port = r.start; > + if (acpi_dev_resource_io(res, &r) || > + acpi_dev_resource_memory(res, &r)) {
> + if (r.flags & IORESOURCE_IO)
You need spend some time to understand better how acpi_dev_resource_*() works. Hint: this condition is redundant.
> + base = (void __iomem *) ioport_map(r.start, > + r.end - r.start + 1); > + else > + base = ioremap(r.start, r.end - r.start + 1); > +
-- With Best Regards, Andy Shevchenko
| |