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

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