[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VfNDKgenuc0ApMODfCw6h9azwBDskPuV2S4E8nLFsuTxw@mail.gmail.com>
Date: Thu, 1 Nov 2018 19:04:00 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: peng.hao2@....com.cn
Cc: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andy@...radead.org>,
Darren Hart <dvhart@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
hutao@...fujitsu.com,
Linux Documentation List <linux-doc@...r.kernel.org>
Subject: Re: [PATCH V5 6/8] misc/pvpanic: add MMIO support
On Thu, Nov 1, 2018 at 9:00 AM Peng Hao <peng.hao2@....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
Powered by blists - more mailing lists