summaryrefslogtreecommitdiffstats
path: root/drivers/misc/pvpanic.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: pvpanic: fix warning implicit declarationAnders Roxell2019-01-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | When building and have fragment CONFIG_NO_IOPORT_MAP enabled then the following warning: ../drivers/misc/pvpanic.c: In function ‘pvpanic_walk_resources’: ../drivers/misc/pvpanic.c:73:10: error: implicit declaration of function ‘ioport_map’; did you mean ‘ioremap’? [-Werror=implicit-function-declaration] base = ioport_map(r.start, resource_size(&r)); ^~~~~~~~~~ Since commmit 5d32a66541c4 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set"), its now possible to have ACPI enabled without haveing PCI enabled. However, the pvpanic driver depends on HAS_IOPORT_MAP or HAVE_IOREMAP_PROT when ACPI is enabled. It was fine until commit 725eba2928ad ("misc/pvpanic: add MMIO support") got added. Rework so that we do a extra check ifdef CONFIG_HAS_IOPORT_MAP. Fixes: 5d32a66541c4 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic: fix a NULL vs IS_ERR() checkDan Carpenter2018-11-271-2/+2
| | | | | | | | | The devm_ioremap_resource() function doesn't return NULL, it returns error pointers. Fixes: 46f934c9a12f ("misc/pvpanic: add support to get pvpanic device info FDT") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic: remove a redundant commaPeng Hao2018-11-071-1/+1
| | | | | | | | | Remove a redundant comma in pvpanic_device_ids. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic: convert to SPDX license tagsPeng Hao2018-11-071-15/+2Star
| | | | | | | | | | Updates license to use SPDX-License-Identifier instead of verbose license text. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic: change header file sort stylePeng Hao2018-11-071-1/+1
| | | | | | | | Make header files alphabetical order. Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic: remove unnecessary header filePeng Hao2018-11-071-1/+0Star
| | | | | | | | | Remove unnecessary header file init.h. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic : break dependency on ACPIPeng Hao2018-11-071-2/+21
| | | | | | | | | The pvpanic driver is available for architectures that do not support ACPI.So break the dependency. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic : grouping ACPI related stuffPeng Hao2018-11-071-22/+21Star
| | | | | | | | | Grouping ACPI related stuff and make preparation to break the ACPI dependency w/o any functional change. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic: add support to get pvpanic device info FDTPeng Hao2018-11-071-1/+63
| | | | | | | | | | | By default, when ACPI tables and FDT coexist for ARM64, current kernel takes precedence over FDT to get device information. Virt machine in qemu provides both FDT and ACPI table. Increases the way to get information through FDT. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic: add MMIO supportPeng Hao2018-11-071-5/+10
| | | | | | | | | | | | 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. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> [Use acpi_dev_resource_memory API. - Andy] Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc/pvpanic: simplify the code using acpi_dev_resource_ioPeng Hao2018-11-071-8/+5Star
| | | | | | | | | | Use acpi_dev_resource_io API. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pvpanic: move pvpanic to misc as common driverPeng Hao2018-11-071-0/+124
Move pvpanic.c from drivers/platform/x86 to drivers/misc. Following patches will use pvpanic device in arm64. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>