Re: [PATCH V7 3/9] misc/pvpanic: add MMIO support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 5, 2018 at 4:31 AM Peng Hao <peng.hao2@xxxxxxxxxx> 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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux