lkml.org 
[lkml]   [2018]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2018-11-01 18:05    [W:0.083 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site